code: def test_from_str(self):
      a = QN("a")
      b = QN("b")
      a_dot_b = QN(a, attr="b")
      a_sub_b = QN(a, subscript=b)
      self.assertEqual(qual_names.from_str("a.b"), a_dot_b)
      self.assertEqual(qual_names.from_str("a"), a)
      self.assertEqual(qual_names.from_str("a[b]"), a_sub_b)
  
imports: import textwrap
  import unittest
  from nvidia.dali._autograph.pyct import anno
  from nvidia.dali._autograph.pyct import parser
  from nvidia.dali._autograph.pyct import qual_names
  from nvidia.dali._autograph.pyct.qual_names import QN
  from nvidia.dali._autograph.pyct.qual_names import resolve
label_desc: Use image node_id 1 for calling the QNTest obj's underlying member method code with example usage: obj.test_from_str() without return types