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: Segregate documents into changed, unchanged and new document, when compared to Weaviate db.
  
  :param data: A single pandas DataFrame.
  :param document_column: The name of the property to query.
  :param class_name: The name of the class to query.
  :param uuid_column: The name of the column containing the UUID.
code: def _get_segregated_documents(
      self,
      data: pd.DataFrame,
      document_column: str,
      class_name: str,
      uuid_column: str,
  ) -> tuple[dict[str, set], set, set, set]:
      """
      Segregate documents into changed, unchanged and new document, when compared to Weaviate db.
  
      :param data: A single pandas DataFrame.
      :param document_column: The name of the property to query.
      :param class_name: The name of the class to query.
      :param uuid_column: The name of the column containing the UUID.
      """
      changed_documents = set()
      unchanged_docs = set()
      new_documents = set()
      existing_documents_to_uuid = self._get_documents_to_uuid_map(
          data=data,
          uuid_column=uuid_column,
          document_column=document_column,
          class_name=class_name,
      )
  
      input_documents_to_uuid = self._prepare_document_to_uuid_map(
          data=data.to_dict("records"),
          group_key=document_column,
          get_value=lambda x: x[uuid_column],
      )
  
      # segregate documents into changed, unchanged and non-existing documents.
      for doc_url, doc_set in input_documents_to_uuid.items():
          if doc_url in existing_documents_to_uuid:
              if existing_documents_to_uuid[doc_url] != doc_set:
                  changed_documents.add(doc_url)
              else:
                  unchanged_docs.add(doc_url)
          else:
              new_documents.add(doc_url)
  
      return (
          existing_documents_to_uuid,
          changed_documents,
          unchanged_docs,
          new_documents,
      )
  
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 35 for calling the WeaviateHook obj's underlying member method code with example usage: obj._get_segregated_documents(data, document_column, class_name, uuid_column) and returns: existing_documents_to_uuid,  changed_documents,  unchanged_docs,  new_documents