code: def getF(var: Tensor):
      if isinstance(var, mx.nd.NDArray):
          return mx.nd
      elif isinstance(var, mx.sym.Symbol):
          return mx.sym
      else:
          raise RuntimeError(
              "var must be instance of NDArray or Symbol in getF"
          )
  
imports: from typing import cast, Any, List, Optional, Tuple
  import mxnet
  import numpy
  from mxnet import autograd
  from gluonts.mx import Tensor
label_desc: Use image node_id 3 for calling a global function with example usage: getF(var) and returns: mx, mx