def METHOD_NAME(self) -> StatusResponse:
    """Check the connection to the Cloud Spanner database.
    Returns:
        StatusResponse: Connection success status and error message if an error occurs.
    """
    response = StatusResponse(False)
    try:
        self.connect()
        response.success = True
    except Exception as e:
        log.logger.error(
            f'Error connecting to Cloud Spanner {self.connection_data["database_id"]}, {e}!'
        )
        response.error_message = str(e)
    finally:
        if response.success is True and self.is_connected:
            self.disconnect()
        if response.success is False and self.is_connected:
            self.is_connected = False
    return response