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 prepare the map of grouped_key to set.
code: def _prepare_document_to_uuid_map(
      data: list[dict], group_key: str, get_value: Callable[[dict], str]
  ) -> dict[str, set]:
      """Helper function to prepare the map of grouped_key to set."""
      grouped_key_to_set: dict = {}
      for item in data:
          document_url = item[group_key]
  
          if document_url not in grouped_key_to_set:
              grouped_key_to_set[document_url] = set()
  
          grouped_key_to_set[document_url].add(get_value(item))
      return grouped_key_to_set
  
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 34 for calling the WeaviateHook obj's underlying member method code with example usage: obj._prepare_document_to_uuid_map(data, group_key, get_value) and returns: grouped_key_to_set