code: def test_import_node(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)
  
      var8 = MyVariable("var8")
      var6 = op2(var8)
  
      with pytest.raises(MissingInputError):
          fg.import_node(var6.owner)
  
      assert var8 not in fg.variables
  
      fg.import_node(var6.owner, import_missing=True)
      assert var8 in fg.inputs
      assert var6.owner in fg.apply_nodes
  
      var7 = op2(var2)
      assert not hasattr(var7.owner.tag, "imported_by")
      fg.import_node(var7.owner)
  
      assert hasattr(var7.owner.tag, "imported_by")
      assert var7 in fg.variables
      assert var7.owner in fg.apply_nodes
      assert (var7.owner, 0) in fg.get_clients(var2)
  
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 5 for calling the TestFunctionGraph obj's underlying member method code with example usage: obj.test_import_node() without return types