code: def assert_models_equivelent(self, expected, got):
      self.assertSetEqual(set(expected.nodes()), set(got.nodes()))
      for node in expected.nodes():
          self.assertListEqual(
              sorted(expected.get_parents(node)),
              sorted(got.get_parents(node)),
          )
          cpds_expected = expected.get_cpds(node=node)
          cpds_got = got.get_cpds(node=node)
          self.assertEqual(cpds_expected, cpds_got)
  
imports: import os
  import unittest
  import xml.etree.ElementTree
  import numpy
  import numpy.testing
  from pgmpy import config
  from pgmpy.factors.discrete import TabularCPD
  from pgmpy.models import BayesianNetwork
  from pgmpy.readwrite import XMLBIFReader, XMLBIFWriter
label_desc: Use image node_id 4 for calling the TestXMLBIFWriterMethodsString obj's underlying member method code with example usage: obj.assert_models_equivelent(expected, got) without return types