code: def testInitShouldSetFieldOffsets(self):
      f = schema.Field(
          [
              schema.Scalar(dtype=np.int32),
              schema.Struct(
                  ("field1", schema.Scalar(dtype=np.int32)),
                  ("field2", schema.List(schema.Scalar(dtype=str))),
              ),
              schema.Scalar(dtype=np.int32),
              schema.Struct(
                  ("field3", schema.Scalar(dtype=np.int32)),
                  ("field4", schema.List(schema.Scalar(dtype=str))),
              ),
              schema.Scalar(dtype=np.int32),
          ]
      )
      self.assertListEqual(f._field_offsets, [0, 1, 4, 5, 8, 9])
  
imports: from caffe2.python import core, schema
  import numpy
  import unittest
  import pickle
  import random
label_desc: Use image node_id 2 for calling the TestField obj's underlying member method code with example usage: obj.testInitShouldSetFieldOffsets() without return types