code: def var_tag(var):
      """Parse tag attribute of variable node."""
      tag = var.tag
      if (
          hasattr(tag, "trace")
          and len(tag.trace)
          and len(tag.trace[0]) == 4
      ):
          if isinstance(tag.trace[0][0], (tuple, list)):
              path, line, _, src = tag.trace[0][-1]
          else:
              path, line, _, src = tag.trace[0]
          path = os.path.basename(path)
          path = path.replace("<", "")
          path = path.replace(">", "")
          src = src.encode()
          return [path, line, src]
      else:
          return None
  
imports: import os
  from functools import reduce
  import numpy
  import pytensor
  from pytensor.compile import Function, builders
  from pytensor.graph.basic import Apply, Constant, Variable, graph_inputs
  from pytensor.graph.fg import FunctionGraph
  from pytensor.printing import pydot_imported, pydot_imported_msg
label_desc: Use image node_id 2 for calling a global function with example usage: var_tag(var) and returns: list, None