def METHOD_NAME(alerts: pd.DataFrame, alert_config_name: str):
    """
    Updates the `pending_alerts` that have the specified `alert_config_name` by:
    - deleting alerts in the `pending_alerts`table of the specified `alert_config_name`
    - inserting alerts of the `alerts` dataframe into the `pending_alerts` table
    Args:
        alerts (pd.DataFrame): Alerts to load into the `pending_alerts` table
        alert_config_name (str): Name that uniquely identifies the set of parameters
          used for the flow run
    """
    try:
        assert alert_config_name and isinstance(alert_config_name, str)
    except AssertionError:
        raise ValueError(
            (
                "alert_config_name must be a non null `str`, "
                f"got {alert_config_name} instead."
            )
        )
    schema = "public"
    table_name = "pending_alerts"
    logger = prefect.context.get("logger")
    e = create_engine("monitorfish_remote")
    with e.begin() as connection:
        table = get_table(
            table_name=table_name, schema=schema, conn=connection, logger=logger
        )
        # This cannot be done by using the `upsert` mode of the `load` fonction because
        # when the input DataFrame is empty, rows in the `pending_alerts` table that
        # correspond to the designated `alert_config_name` must be deleted, which does
        # not happen if there is not at least one row in the DataFrame that contains
        # the information of which `alert_config_name` needs to be deleted.
        delete_rows(
            table=table,
            id_column="alert_config_name",
            ids_to_delete=[alert_config_name],
            connection=connection,
            logger=logger,
        )
        load(
            alerts,
            table_name=table_name,
            schema=schema,
            logger=logger,
            how="append",
            jsonb_columns=["value"],
            nullable_integer_columns=["vessel_id"],
            connection=connection,
        )