class_docstr: A hasher that can hash objects with cycles.
class_docstr_tok: ["A","hasher","that","can","hash","objects","with","cycles","."]
code: def __init__(
      self,
      cache_type: CacheType,
      hash_funcs: Optional[HashFuncsDict] = None,
  ):
      # Can't use types as the keys in the internal _hash_funcs because
      # we always remove user-written modules from memory when rerunning a
      # script in order to reload it and grab the latest code changes.
      # (See LocalSourcesWatcher.py:on_file_changed) This causes
      # the type object to refer to different underlying class instances each run,
      # so type-based comparisons fail. To solve this, we use the types converted
      # to fully-qualified strings as keys in our internal dict.
      self._hash_funcs: HashFuncsDict
      if hash_funcs:
          self._hash_funcs = {
              k if isinstance(k, str) else type_util.get_fqn(k): v
              for k, v in hash_funcs.items()
          }
      else:
          self._hash_funcs = {}
      self._hashes: Dict[Any, bytes] = {}
  
      # The number of the bytes in the hash.
      self.size = 0
  
      self.cache_type = cache_type
  
imports: import collections
  import dataclasses
  import datetime
  import functools
  import hashlib
  import inspect
  import io
  import os
  import pickle
  import struct
  import sys
  import tempfile
  import threading
  import unittest.mock
  import uuid
  import weakref
  from enum import Enum
  from typing import Any, Callable, Dict, List, Optional, Pattern, Type, Union
  from streamlit import type_util, util
  from streamlit.errors import StreamlitAPIException
  from streamlit.runtime.caching.cache_errors import UnhashableTypeError
  from streamlit.runtime.caching.cache_type import CacheType
  from streamlit.runtime.uploaded_file_manager import UploadedFile
  from streamlit.util import HASHLIB_KWARGS
label_desc: Use image node_id 1 to create a new _CacheFuncHasher object  with example: obj = _CacheFuncHasher(cache_type, hash_funcs)