code: def test_get_ancestors_of(self):
      self.assertListEqual(
          sorted(self.G1._get_ancestors_of("b")), ["a", "b"]
      )
      self.assertListEqual(
          sorted(self.G1._get_ancestors_of("e")), ["a", "e"]
      )
      self.assertListEqual(
          sorted(self.G1._get_ancestors_of("a")), ["a"]
      )
      self.assertListEqual(
          sorted(self.G1._get_ancestors_of(["b", "e"])), ["a", "b", "e"]
      )
  
imports: import unittest
  import networkx
  import pandas
  import numpy
  from pgmpy.models import NaiveBayes
  from pgmpy.independencies import Independencies
label_desc: Use image node_id 5 for calling the TestNaiveBayesMethods obj's underlying member method code with example usage: obj.test_get_ancestors_of() without return types