class_docstr: Represents a qualified name.
docstr: AST representation.
code: def ast(self):
      """AST representation."""
      # The caller must adjust the context appropriately.
      if self.has_subscript():
          return gast.Subscript(
              value=self.parent.ast(),
              slice=self.qn[-1].ast(),
              ctx=CallerMustSetThis,
          )
      if self.has_attr():
          return gast.Attribute(
              value=self.parent.ast(),
              attr=self.qn[-1],
              ctx=CallerMustSetThis,
          )
  
      base = self.qn[0]
      if isinstance(base, str):
          return gast.Name(
              base,
              ctx=CallerMustSetThis,
              annotation=None,
              type_comment=None,
          )
      elif isinstance(base, Literal):
          return gast.Constant(base.value, kind=None)
      else:
          assert False, (
              "the constructor should prevent types other than "
              "str and Literal"
          )
  
imports: import collections
  import gast
  from nvidia.dali._autograph.pyct import anno
  from nvidia.dali._autograph.pyct import parser
label_desc: Use image node_id 18 for calling the QN obj's underlying member method code with example usage: obj.ast() and returns: gast, gast, gast, gast