code: def load_json(s):
      if isinstance(s, List) and all(
          isinstance(x, (str, int)) for x in s
      ):
          return s
  
      if isinstance(s, Dict) and all(
          isinstance(x[0], int)
          and (
              # Dict[int, int]
              isinstance(x[1], int)
              or (  # Dict[int, Dict[int, float]]
                  isinstance(x[1], Dict)
                  and all(
                      isinstance(y[0], int) and isinstance(y[1], float)
                      for y in x[1].items()
                  )
              )
          )
          for x in s.items()
      ):
          return s
      return json.loads(s)
  
imports: import json
  import logging
  import re
  from typing import Any, Dict, List, Type, TypeVar
  from pytext.config.component import Component, ComponentType
  from pytext.data.utils import shard
  from pytext.utils.data import parse_slot_string, Slot
  from pytext.utils.file_io import PathManager
label_desc: Use image node_id 3 for calling a global function with example usage: load_json(s) and returns: json, s, s