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_accessibility_sources_by_id(accessibility_sources):
"""
Gets a dictionary of accessibility sources keyed by their 'accessibilityFormatIdentifier'.
"""
accessibility_sources_by_id = {}
for source in accessibility_sources:
accessibility_identifier = view_accessibility_identifier(source)
if accessibility_identifier:
accessibility_sources_by_id[accessibility_identifier] = source
return accessibility_sources_by_id