def METHOD_NAME(controls_segments: pd.DataFrame):
    logger = prefect.context.get("logger")
    e = create_engine("monitorfish_remote")
    with e.begin() as connection:
        logger.info("Creating temporary table")
        connection.execute(
            text(
                "CREATE TEMP TABLE tmp_controls_segments("
                "    id INTEGER PRIMARY KEY,"
                "    segments jsonb"
                ")"
                "ON COMMIT DROP;"
            )
        )
        controls_segments = prepare_df_for_loading(
            controls_segments,
            logger,
            jsonb_columns=["segments"],
        )
        logger.info("Loading to temporary table")
        controls_segments.to_sql(
            "tmp_controls_segments",
            connection,
            if_exists="append",
            index=False,
            method=psql_insert_copy,
        )
        logger.info("Updating segments from temporary table")
        connection.execute(
            text(
                "UPDATE public.mission_actions a "
                "SET "
                "    segments = cs.segments "
                "FROM tmp_controls_segments cs "
                "WHERE a.id = cs.id;"
            )
        )