class_docstr: This handler handles connection and execution of the Weaviate statements.
class_docstr_tok: ["This","handler","handles","connection","and","execution","of","the","Weaviate","statements","."]
docstr: Check the connection to the Weaviate database.
docstr_tok: ["Check","the","connection","to","the","Weaviate","database","."]
code: def check_connection(self):
      """Check the connection to the Weaviate database."""
      response_code = StatusResponse(False)
  
      try:
          if self._client.is_live():
              response_code.success = True
      except Exception as e:
          logger.error(f"Error connecting to weaviate , {e}!")
          response_code.error_message = str(e)
      finally:
          if response_code.success and not self.is_connected:
              self.disconnect()
          if not response_code.success and self.is_connected:
              self.is_connected = False
  
      return response_code
  
imports: from collections import OrderedDict
  from datetime import datetime
  from typing import List, Optional
  import weaviate
  from weaviate.embedded import EmbeddedOptions
  import pandas
  from mindsdb.integrations.libs.const import HANDLER_CONNECTION_ARG_TYPE
  from mindsdb.integrations.libs.response import RESPONSE_TYPE
  from mindsdb.integrations.libs.response import HandlerResponse
  from mindsdb.integrations.libs.response import HandlerResponse
  from mindsdb.integrations.libs.response import HandlerStatusResponse
  from mindsdb.integrations.libs.vectordatabase_handler import FilterCondition, FilterOperator, TableField, VectorStoreHandler
  from mindsdb.utilities import log
  from weaviate.util import generate_uuid5
label_desc: Use image node_id 6 for calling the WeaviateDBHandler obj's underlying member method code with example usage: obj.check_connection() and returns: response_code