def METHOD_NAME(context: CoreContext) -> None:
    configuration = TrinoConfiguration(context.configuration)
    def new_connection() -> PEP249Connection:
        connection = TrinoConnection(
            host=configuration.host(),
            port=configuration.port(),
            schema=configuration.schema(),
            catalog=configuration.catalog(),
            user=configuration.user(),
            password=configuration.password(),
            use_ssl=configuration.use_ssl(),
            ssl_verify=configuration.ssl_verify(),
            timeout_seconds=configuration.timeout_seconds(),
            lineage_logger=context.state.get(LINEAGE_LOGGER_KEY),
        )
        return connection
    context.state.set(CONNECTION_FUNC_KEY, new_connection)
    trino_config.trino_templates_data_to_target_strategy = (
        configuration.templates_data_to_target_strategy()
    )