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","."]
code: def _get_client(self) -> weaviate.Client:
      if not (
          self._client_config
          and (
              self._client_config.get("weaviate_url")
              or self._client_config.get("persistence_directory")
          )
      ):
          raise Exception(
              "Client config is not set! or missing parameters"
          )
  
      # decide the client type to be used, either persistent or httpclient
      if self._client_config.get("persistence_directory"):
          self._embedded_options = EmbeddedOptions(
              persistence_data_path=self._client_config.get(
                  "persistence_directory"
              )
          )
          return weaviate.Client(
              embedded_options=self._embedded_options
          )
      if self._client_config.get("weaviate_api_key"):
          return weaviate.Client(
              url=self._client_config["weaviate_url"],
              auth_client_secret=weaviate.AuthApiKey(
                  api_key=self._client_config["weaviate_api_key"]
              ),
          )
      return weaviate.Client(url=self._client_config["weaviate_url"])
  
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 2 for calling the WeaviateDBHandler obj's underlying member method code with example usage: obj._get_client() and returns: weaviate, weaviate, weaviate