code: def is_variable(x):
      if not isinstance(x, Variable):
          raise TypeError(f"not a Variable: {x}")
      return x
  
imports: import numpy
  from pytensor.graph.basic import Apply, Constant, NominalVariable, Variable
  from pytensor.graph.fg import FunctionGraph
  from pytensor.graph.op import HasInnerGraph, Op
  from pytensor.graph.replace import clone_replace
  from pytensor.graph.type import Type
label_desc: Use image node_id 1 for calling a global function with example usage: is_variable(x) and returns: x