code: def setUp(self):
      self.model = SEM.from_graph(
          ebunch=[
              ("Z1", "X", 1.0),
              ("Z2", "X", 1.0),
              ("Z2", "W", 1.0),
              ("W", "U", 1.0),
              ("U", "X", 1.0),
              ("U", "Y", 1.0),
              ("X", "Y", 1.0),
          ],
          latents=["U"],
          err_var={"Z1": 1, "Z2": 1, "W": 1, "X": 1, "U": 1, "Y": 1},
      )
      self.generated_data = self.model.to_lisrel().generate_samples(
          100000
      )
  
file_path: pgmpy/pgmpy/tests/test_estimators/test_SEMEstimator.py
imports: import unittest
  import numpy
  import pandas
  import torch
  from pgmpy import config
  from pgmpy.estimators import IVEstimator, SEMEstimator
  from pgmpy.models import SEM, SEMGraph
label_desc: Use image node_id 1 for calling the TestIVEstimator obj's underlying member method code with example usage: obj.setUp() without return types