Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def get_object_id(element):
for child in element_and_parents(element):
object_id = child.get('id')
if object_id is not None:
return object_id
return None