code: def hook_json_read(obj):
      """Hook function to decode JSON objects during reading
  
      Parameters
      ----------
      obj: Object
          JSON object to process, or return unchanged
  
      Returns
      -------
      Object
          If `obj` contains the key "__tuple__", its value is cast to a tuple and returned. Else,
          `obj` is returned unchanged
  
      Examples
      --------
      >>> assert hook_json_read({"__tuple__": [1, 2]}) == (1, 2)
      >>> assert hook_json_read({"__tuple__": (1, 2)}) == (1, 2)
      >>> assert hook_json_read({"a": "foo", "b": 42}) == {"a": "foo", "b": 42}
      """
      if "__tuple__" in obj:
          return tuple(obj["__tuple__"])
      return obj
  
imports: from hyperparameter_hunter.settings import G
  from contextlib import suppress
  from inspect import signature
  import numpy
  import os
  import os.path
  import pandas
  import simplejson
  from typing import Union
  import wrapt
label_desc: Use image node_id 2 for calling a global function with example usage: hook_json_read(obj) and returns: obj, tuple