class_docstr: Interact with Weaviate database to store vectors. This hook uses the 'conn_id'.
  
  :param conn_id: The connection id to use when connecting to Weaviate. <howto/connection:weaviate>
class_docstr_tok: ["Interact","with","Weaviate","database","to","store","vectors",".","This","hook","uses","the","'conn_id","'",".",":","param","conn_id",":","The","connection","id","to","use","when","connecting","to","Weaviate",".","<","howto\/connection",":","weaviate",">"]
docstr: Helper function to convert list of class properties into dict by using a `key_property` as key.
  
  This is done to avoid class properties comparison as list of properties.
  
  Case 1:
  A = [1, 2, 3]
  B = [1, 2]
  When comparing list we check for the length, but it's not suitable for subset check.
  
  Case 2:
  A = [1, 2, 3]
  B = [1, 3, 2]
  When we compare two lists, we compare item 1 of list A with item 1 of list B and
   pass if the two are same, but there can be scenarios when the properties are not in same order.
code: def _convert_properties_to_dict(
      classes_objects, key_property: str = "name"
  ):
      """
      Helper function to convert list of class properties into dict by using a `key_property` as key.
  
      This is done to avoid class properties comparison as list of properties.
  
      Case 1:
      A = [1, 2, 3]
      B = [1, 2]
      When comparing list we check for the length, but it's not suitable for subset check.
  
      Case 2:
      A = [1, 2, 3]
      B = [1, 3, 2]
      When we compare two lists, we compare item 1 of list A with item 1 of list B and
       pass if the two are same, but there can be scenarios when the properties are not in same order.
      """
      for cls in classes_objects:
          cls["properties"] = {
              p[key_property]: p for p in cls["properties"]
          }
      return classes_objects
  
imports: from __future__ import annotations
  import contextlib
  import json
  import warnings
  from functools import cached_property
  from typing import TYPE_CHECKING, Any, Dict, List, Sequence, cast
  import requests
  import weaviate.exceptions
  from tenacity import Retrying, retry, retry_if_exception, retry_if_exception_type, stop_after_attempt
  from weaviate import Client
  from weaviate.auth import AuthApiKey, AuthBearerToken, AuthClientCredentials, AuthClientPassword
  from weaviate.data.replication import ConsistencyLevel
  from weaviate.exceptions import ObjectAlreadyExistsException
  from weaviate.util import generate_uuid5
  from airflow.exceptions import AirflowProviderDeprecationWarning
  from airflow.hooks.base import BaseHook
label_desc: Use image node_id 17 for calling the WeaviateHook obj's underlying member method code with example usage: obj._convert_properties_to_dict(classes_objects, key_property) and returns: classes_objects