code: def class_from_json(json: Dict[str, Any]) -> Type[Any]:
      """Load any class registered in `CLASS_DECODER_REGISTRY` from JSON."""
      index_in_registry = json.pop("index")
      class_path = json.pop("class")
      for _class in CLASS_TO_REVERSE_REGISTRY:
          if class_path == f"{_class}":
              reverse_registry = CLASS_TO_REVERSE_REGISTRY[_class]
              if index_in_registry not in reverse_registry:
                  raise ValueError(
                      f"Index '{index_in_registry}'"
                      " is not registered in the reverse registry."
                  )
              return reverse_registry[index_in_registry]
      raise ValueError(
          f"{class_path} does not have a corresponding entry in "
          "CLASS_TO_REVERSE_REGISTRY."
      )
  
imports: from __future__ import annotations
  import inspect
  import logging
  from datetime import datetime
  from pathlib import Path
  from typing import Any, Dict, Iterable, List, Optional, Type, TYPE_CHECKING, Union
  import torch
  from ax.core.arm import Arm
  from ax.core.base_trial import TrialStatus
  from ax.core.batch_trial import AbandonedArm, BatchTrial, GeneratorRunStruct
  from ax.core.generator_run import GeneratorRun
  from ax.core.runner import Runner
  from ax.core.trial import Trial
  from ax.exceptions.storage import JSONDecodeError
  from ax.modelbridge.transforms.base import Transform
  from ax.storage.botorch_modular_registry import CLASS_TO_REVERSE_REGISTRY, REVERSE_INPUT_TRANSFORM_REGISTRY, REVERSE_OUTCOME_TRANSFORM_REGISTRY
  from ax.storage.transform_registry import REVERSE_TRANSFORM_REGISTRY
  from ax.utils.common.kwargs import warn_on_kwargs
  from ax.utils.common.logger import get_logger
  from ax.utils.common.typeutils import checked_cast
  from ax.utils.common.typeutils_torch import torch_type_from_str
  from botorch.models.transforms.input import ChainedInputTransform, InputTransform
  from botorch.models.transforms.outcome import ChainedOutcomeTransform, OutcomeTransform
label_desc: Use image node_id 6 for calling a global function with example usage: class_from_json(json) and returns: reverse_registry