def _get_old_package_revision_license_ids(migrate_engine):
 old_ids = {}
 select_licenses = 'SELECT id, license_id FROM package_revision;'
 q = migrate_engine.execute(select_licenses)
 for (id, license_id) in q:
  old_ids[id] = license_id
 return old_ids

def _get_old_package_revision_license_ids ( migrate_engine ) : old_ids = { } select_licenses = 'SELECT id, license_id FROM package_revision;' q = migrate_engine . execute ( select_licenses ) for ( id , license_id ) in q : old_ids [ id ] = license_id return old_ids
returns a dict of old license ids .