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