code: def modify_execution_date_with_constraint(
      conn, batch_operator, table_name, type_, nullable
  ) -> None:
      """Change type of column execution_date.
      Helper function changes type of column execution_date by
      dropping and recreating any primary/unique constraint associated with
      the column
  
      :param conn: sql connection object
      :param batch_operator: batch_alter_table for the table
      :param table_name: table name
      :param type_: DB column type
      :param nullable: nullable (boolean)
      :return: a dictionary of ((constraint name, constraint type), column name) of table
      """
      constraint_dict = get_table_constraints(conn, table_name)
      drop_constraint(batch_operator, constraint_dict)
      batch_operator.alter_column(
          column_name="execution_date",
          type_=type_,
          nullable=nullable,
      )
      create_constraint(batch_operator, constraint_dict)
  
file_path: airflow/airflow/migrations/versions/0046_1_10_5_change_datetime_to_datetime2_6_on_mssql_.py
imports: from __future__ import annotations
  from collections import defaultdict
  from alembic import op
  from sqlalchemy import text
  from sqlalchemy.dialects import mssql
label_desc: Use image node_id 7 for calling a global function with example usage: modify_execution_date_with_constraint(conn, batch_operator, table_name, type_, nullable) without return types