code: def test_import_var(self):
      var1 = MyVariable("var1")
      var2 = MyVariable("var2")
      var3 = op1(var2, var1)
      var4 = op2(var3, var2)
      var5 = op3(var4, var2, var2)
      fg = FunctionGraph([var1, var2], [var3, var5], clone=False)
  
      var0 = MyVariable("var0")
  
      with pytest.raises(MissingInputError):
          # We can't import a new `FunctionGraph` input (i.e. something
          # without an owner), at least not without setting `import_missing`
          fg.import_var(var0, "testing")
  
      fg.import_var(var0, import_missing=True)
  
      assert var0 in fg.inputs
  
      var5 = op2()
      # We can import variables with owners
      fg.import_var(var5, "testing")
      assert var5 in fg.variables
      assert var5.owner in fg.apply_nodes
  
      with pytest.raises(
          TypeError, match="Computation graph contains.*"
      ):
          from pytensor.graph.null_type import NullType
  
          fg.import_var(NullType()(), "testing")
  
imports: import pickle
  import numpy
  import pytest
  from pytensor.configdefaults import config
  from pytensor.graph.basic import NominalVariable
  from pytensor.graph.fg import FunctionGraph
  from pytensor.graph.utils import MissingInputError
  from tests.graph.utils import MyConstant, MyOp, MyType, MyVariable, MyVariable2, op1, op2, op3
label_desc: Use image node_id 6 for calling the TestFunctionGraph obj's underlying member method code with example usage: obj.test_import_var() without return types