code: def test_active_trail_nodes(self):
      demo_nodes = [
          "x1",
          "x2",
          "x3",
          "y1",
          "y2",
          "y3",
          "y4",
          "y5",
          "y6",
          "y7",
          "y8",
      ]
      for node in demo_nodes:
          self.assertSetEqual(
              self.demo.active_trail_nodes(node, struct="full")[node],
              set(demo_nodes),
          )
  
      union_nodes = self.union.graph.nodes()
      active_trails = self.union.active_trail_nodes(
          list(union_nodes), struct="full"
      )
      for node in union_nodes:
          self.assertSetEqual(active_trails[node], set(union_nodes))
  
      self.assertSetEqual(
          self.union.active_trail_nodes(
              "age", observed=["laboract", "deferenc", "unionsen"]
          )["age"],
          {"age", "yrsmill"},
      )
  
imports: import os
  import unittest
  import networkx
  import numpy
  import numpy.testing
  from pgmpy.models import SEM, SEMAlg, SEMGraph
label_desc: Use image node_id 6 for calling the TestSEMGraph obj's underlying member method code with example usage: obj.test_active_trail_nodes() without return types