code: def cache(func):
      """
      Transform mutable dictionary into immutable before call to lru_cache
      """
  
      class HDict(dict):
          def __hash__(self):
              return hash(frozenset(self.items()))
  
      func = lru_cache(maxsize=None, typed=True)(func)
  
      @wraps(func)
      def wrapper(*args, **kwargs):
          args = tuple(
              [
                  HDict(arg) if isinstance(arg, dict) else arg
                  for arg in args
              ]
          )
          kwargs = {
              k: HDict(v) if isinstance(v, dict) else v
              for k, v in kwargs.items()
          }
          return func(*args, **kwargs)
  
      wrapper.cache_clear = func.cache_clear
      return wrapper
  
imports: import dataclasses
  import logging
  import os
  import socket
  from functools import lru_cache, wraps
  from typing import TYPE_CHECKING, Any, Dict, Iterable, List, Mapping, Optional, Text
  from urllib.parse import urljoin, urlparse
  import urllib3
  from bravado.client import SwaggerClient
  from bravado.exception import HTTPError
  from bravado.http_client import HttpClient
  from bravado.requests_client import RequestsResponseAdapter
  from bravado_core.formatter import SwaggerFormat
  from packaging.version import Version
  from requests import Response, Session
  from neptune.common.backends.utils import with_api_exceptions_handler
  from neptune.envs import NEPTUNE_ALLOW_SELF_SIGNED_CERTIFICATE
  from neptune.exceptions import CannotResolveHostname, MetadataInconsistency, NeptuneClientUpgradeRequiredError, NeptuneFeatureNotAvailableException
  from neptune.internal.backends.api_model import ClientConfig
  from neptune.internal.backends.swagger_client_wrapper import SwaggerClientWrapper
  from neptune.internal.operation import CopyAttribute, Operation
  from neptune.internal.utils import replace_patch_version
  from neptune.internal.utils.logger import logger
label_desc: Use image node_id 7 for calling a global function with example usage: cache(func) and returns: wrapper, func, hash