code: def generic_find_fk_constraint_names(table, columns, referenced, insp):
      
      names = set()
  
      for fk in insp.get_foreign_keys(table):
          if fk['referred_table'] == referenced and set(fk['referred_columns']) == columns:
              names.add(fk['name'])
  
      return names
docs: Utility to find foreign-key constraint names in alembic migrations