code: def test_referenced(self):
      scope = activity.Scope(None)
      scope.read.add(QN("a"))
  
      child = activity.Scope(scope)
      child.read.add(QN("b"))
  
      child2 = activity.Scope(child, isolated=False)
      child2.read.add(QN("c"))
  
      child2.finalize()
      child.finalize()
      scope.finalize()
  
      self.assertIn(QN("c"), child2.referenced)
      self.assertIn(QN("b"), child2.referenced)
      self.assertIn(QN("a"), child2.referenced)
  
      self.assertIn(QN("c"), child.referenced)
      self.assertIn(QN("b"), child.referenced)
      self.assertIn(QN("a"), child.referenced)
  
imports: import unittest
  import gast
  from nvidia.dali._autograph.pyct import anno
  from nvidia.dali._autograph.pyct import naming
  from nvidia.dali._autograph.pyct import parser
  from nvidia.dali._autograph.pyct import qual_names
  from nvidia.dali._autograph.pyct import transformer
  from nvidia.dali._autograph.pyct.static_analysis import activity
  from nvidia.dali._autograph.pyct.static_analysis import annos
label_desc: Use image node_id 8 for calling the ScopeTest obj's underlying member method code with example usage: obj.test_referenced() without return types