@contextmanager
def managed_connection(self, connection_options: SqlConnectionOptions=None) -> Connection:
    if (connection_options is None):
        connection_options = self.connection_options
    self.setup_pre_connection(connection_options)
    connection: Connection = None
    try:
        connection = self.sql_engine.connect()
        (yield connection)
    finally:
        self.close_connection(connection)
@contextmanager
def managed_connection(self, connection_options: SqlConnectionOptions=None) -> Connection:
    if (connection_options is None):
        connection_options = self.connection_options
    self.setup_pre_connection(connection_options)
    connection: Connection = None
    try:
        connection = self.sql_engine.connect()
        (yield connection)
    finally:
        self.close_connection(connection)