def METHOD_NAME(self):
    # type: () -> Iterator[teradatasql.connection]
    conn = None
    if TERADATASQL_IMPORT_ERROR:
        self.log.error(
            'Teradata SQL Driver module is unavailable. Please double check your installation and refer to the '
            'Datadog documentation for more information. %s',
            TERADATASQL_IMPORT_ERROR,
        )
        raise TERADATASQL_IMPORT_ERROR
    self.log.info('Connecting to Teradata database %s on server %s.', self.config.database, self.config.server)
    try:
        conn = teradatasql.METHOD_NAME(self._connect_params)
        self.log.info('Connected to Teradata.')
        yield conn
    except Exception as e:
        self.log.error('Unable to connect to Teradata. %s.', e)
        raise e
    finally:
        if conn:
            conn.close()