code: def test_validate_inputs(self):
      var1 = op1()
      var2 = op2()
  
      with pytest.raises(
          TypeError, match="'Variable' object is not iterable"
      ):
          FunctionGraph(var1, [var2])
  
      with pytest.raises(
          TypeError, match="'Variable' object is not reversible"
      ):
          FunctionGraph([var1], var2)
  
      with pytest.raises(
          ValueError,
          match=(
              "One of the provided inputs is the output of an already existing node. "
              "If that is okay, either discard that input's owner or use graph.clone."
          ),
      ):
          var3 = op1(var1)
          FunctionGraph([var3], [var2], clone=False)
  
      with pytest.raises(ValueError, match="No outputs specified"):
          var3 = op1(var1)
          FunctionGraph([var3], clone=False)
  
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 2 for calling the TestFunctionGraph obj's underlying member method code with example usage: obj.test_validate_inputs() without return types