code: def test_inputs(self):
      for child, parents_in_plot in self.compute_graph.items():
          var = self.model[child]
          parents_in_graph = self.model_graph.get_parent_names(var)
          if isinstance(var, (SharedVariable, TensorConstant)):
              # observed data also doesn't have parents in the compute graph!
              # But for the visualization we like them to become descendants of the
              # RVs that these observations belong to.
              assert not parents_in_graph
          else:
              assert parents_in_plot == parents_in_graph
  
imports: import warnings
  import numpy
  import pytensor
  import pytensor.tensor
  import pytest
  from pytensor.compile.sharedvalue import SharedVariable
  from pytensor.tensor.variable import TensorConstant
  import pymc
  from pymc.exceptions import ImputationWarning
  from pymc.model_graph import ModelGraph, model_to_graphviz, model_to_networkx
label_desc: Use image node_id 2 for calling the BaseModelGraphTest obj's underlying member method code with example usage: obj.test_inputs() without return types