code: def testGetFieldByNestedName(self):
      st = schema.Struct(
          ("a", schema.Scalar()),
          (
              "b",
              schema.Struct(
                  (
                      "c",
                      schema.Struct(
                          ("d", schema.Scalar()),
                      ),
                  ),
              ),
          ),
      )
      self.assertRaises(KeyError, st.__getitem__, "")
      self.assertRaises(KeyError, st.__getitem__, "x")
      self.assertRaises(KeyError, st.__getitem__, "x:y")
      self.assertRaises(KeyError, st.__getitem__, "b:c:x")
      a = st["a"]
      self.assertTrue(isinstance(a, schema.Scalar))
      bc = st["b:c"]
      self.assertIn("d", bc.fields)
      bcd = st["b:c:d"]
      self.assertTrue(isinstance(bcd, schema.Scalar))
  
imports: from caffe2.python import core, schema
  import numpy
  import unittest
  import pickle
  import random
label_desc: Use image node_id 20 for calling the TestDB obj's underlying member method code with example usage: obj.testGetFieldByNestedName() without return types