class_docstr: Initializes the Approximate Inference class.
  
  Parameters
  ----------
  model: Instance of pgmpy.models.BayesianNetwork or pgmpy.models.DynamicBayesianNetwork
  
  Examples
  --------
  >>> from pgmpy.utils import get_example_model
  >>> model = get_example_model('alarm')
  >>> infer = ApproxInference(model)
code: def __init__(self, model):
      if not isinstance(
          model, (BayesianNetwork, DynamicBayesianNetwork)
      ):
          raise ValueError(
              f"model should either be a Bayesian Network or Dynamic Bayesian Network. Got {type(model)}."
          )
      model.check_model()
      self.model = model
  
file_path: pgmpy/pgmpy/inference/ApproxInference.py
imports: import itertools
  from pgmpy.factors.discrete import DiscreteFactor
  from pgmpy.models import BayesianNetwork, DynamicBayesianNetwork
label_desc: Use image node_id 1 to create a new ApproxInference object from inherited base classes: object with example: obj = ApproxInference(model)