code: def maybe_eval(x: str) -> Any:
      if isinstance(x, str):
          if x.startswith("$"):
              return eval(x[1:])
          return x
      elif isinstance(x, list):
          return list(map(maybe_eval, x))
      else:
          return x
  
imports: import numbers
  from typing import Any, Dict, Tuple, Union, Iterable
  from pytorch_toolbelt.utils.support import pytorch_toolbelt_deprecated
label_desc: Use image node_id 1 for calling a global function with example usage: maybe_eval(x) and returns: x, eval, list, x