code: def test_get_model(self):
      edges_expected = [
          ("family-out", "dog-out"),
          ("bowel-problem", "dog-out"),
          ("family-out", "light-on"),
          ("dog-out", "hear-bark"),
      ]
      nodes_expected = [
          "bowel-problem",
          "hear-bark",
          "light-on",
          "dog-out",
          "family-out",
      ]
      edge_expected = {
          "bowel-problem": {"dog-out": {"weight": None}},
          "dog-out": {"hear-bark": {"weight": None}},
          "family-out": {
              "dog-out": {"weight": None},
              "light-on": {"weight": None},
          },
          "hear-bark": {},
          "light-on": {},
      }
      node_expected = {
          "bowel-problem": {"weight": None, "position": "(335, 99)"},
          "dog-out": {"weight": None, "position": "(300, 195)"},
          "family-out": {"weight": None, "position": "(257, 99)"},
          "hear-bark": {"weight": None, "position": "(296, 268)"},
          "light-on": {"weight": None, "position": "(218, 195)"},
      }
      cpds_expected = [
          TabularCPD(
              variable="bowel-problem",
              variable_card=2,
              values=np.array([[0.01], [0.99]]),
              state_names={"bowel-problem": ["true", "false"]},
          ),
          TabularCPD(
              variable="dog-out",
              variable_card=2,
              values=np.array(
                  [[0.99, 0.97, 0.9, 0.3], [0.01, 0.03, 0.1, 0.7]]
              ),
              evidence=["bowel-problem", "family-out"],
              evidence_card=[2, 2],
              state_names={
                  "dog-out": ["true", "false"],
                  "bowel-problem": ["true", "false"],
                  "family-out": ["true", "false"],
              },
          ),
          TabularCPD(
              variable="family-out",
              variable_card=2,
              values=np.array([[0.15], [0.85]]),
              state_names={"family-out": ["true", "false"]},
          ),
          TabularCPD(
              variable="hear-bark",
              variable_card=2,
              values=np.array([[0.7, 0.01], [0.3, 0.99]]),
              evidence=["dog-out"],
              evidence_card=[2],
              state_names={
                  "hear-bark": ["true", "false"],
                  "dog-out": ["true", "false"],
              },
          ),
          TabularCPD(
              variable="light-on",
              variable_card=2,
              values=np.array([[0.6, 0.05], [0.4, 0.95]]),
              evidence=["family-out"],
              evidence_card=[2],
              state_names={
                  "light-on": ["true", "false"],
                  "family-out": ["true", "false"],
              },
          ),
      ]
      model = self.reader.get_model()
      model_cpds = model.get_cpds()
      for cpd_index in range(5):
          self.assertEqual(
              model_cpds[cpd_index], cpds_expected[cpd_index]
          )
  
      self.assertDictEqual(dict(model.nodes), node_expected)
      self.assertDictEqual(dict(model.adj), edge_expected)
  
      self.assertListEqual(
          sorted(model.nodes()), sorted(nodes_expected)
      )
      self.assertListEqual(
          sorted(model.edges()), sorted(edges_expected)
      )
  
imports: import os
  import unittest
  import networkx
  import numpy
  import numpy.testing
  from pgmpy import config
  from pgmpy.factors.discrete import TabularCPD
  from pgmpy.models import BayesianNetwork
  from pgmpy.readwrite import BIFReader, BIFWriter
label_desc: Use image node_id 10 for calling the TestBIFReaderTorch obj's underlying member method code with example usage: obj.test_get_model() without return types