code: def instantiate_transform(transform_option, attr="transform"):
      """Creates a transform from an OmegaConf dict such as
      transform: GridSampling3D
          params:
              size: 0.01
      """
      tr_name = getattr(transform_option, attr, None)
      try:
          # tr_params = transform_option.params
          tr_params = transform_option.get(
              "params"
          )  # Update to OmegaConf 2.0
      except KeyError:
          tr_params = None
      try:
          # lparams = transform_option.lparams
          lparams = transform_option.get(
              "lparams"
          )  # Update to OmegaConf 2.0
      except KeyError:
          lparams = None
  
      cls = getattr(_custom_transforms, tr_name, None)
      if not cls:
          cls = getattr(_torch_geometric_transforms, tr_name, None)
          if not cls:
              raise ValueError(
                  "Transform %s is nowhere to be found" % tr_name
              )
  
      if tr_params and lparams:
          return cls(*lparams, **tr_params)
  
      if tr_params:
          return cls(**tr_params)
  
      if lparams:
          return cls(*lparams)
  
      return cls()
  
imports: import sys
  import numpy
  import torch_geometric.transforms
  from .transforms import *
  from .grid_transform import *
  from .sparse_transforms import *
  from .inference_transforms import *
  from .feature_augment import *
  from .features import *
  from .filters import *
  from .precollate import *
  from .prebatchcollate import *
  from omegaconf.dictconfig import DictConfig
  from omegaconf.listconfig import ListConfig
  from omegaconf import OmegaConf
label_desc: Use image node_id 1 for calling a global function with example usage: instantiate_transform(transform_option, attr) and returns: cls, cls, cls, cls