def _get_old_license_titles(migrate_engine):
 titles = {}
 select_licenses = 'SELECT id, name FROM license;'
 q = migrate_engine.execute(select_licenses)
 for (id, title) in q:
  titles[id] = title
 return titles

def _get_old_license_titles ( migrate_engine ) : titles = { } select_licenses = 'SELECT id, name FROM license;' q = migrate_engine . execute ( select_licenses ) for ( id , title ) in q : titles [ id ] = title return titles
returns a dict of old license titles .