code: def test_getitem_field(self):
      dtype = np.dtype(
          [
              ("position", np.float32, 3),
              ("texcoord", np.float32, 2),
              ("color", np.float32, 4),
          ]
      )
      data = np.zeros(10, dtype=dtype)
      B = DataBuffer(data)
  
      Z = B["position"]
      assert Z.nbytes == 10 * 3 * np.dtype(np.float32).itemsize
      assert Z.offset == 0
      assert Z.size == 10
      assert Z.itemsize == 3 * np.dtype(np.float32).itemsize
      assert Z.stride == (3 + 2 + 4) * np.dtype(np.float32).itemsize
      assert Z.dtype == (np.float32, 3)
  
      Z = B["texcoord"]
      assert Z.nbytes == 10 * 2 * np.dtype(np.float32).itemsize
      assert Z.offset == 3 * np.dtype(np.float32).itemsize
      assert Z.size == 10
      assert Z.itemsize == 2 * np.dtype(np.float32).itemsize
      assert Z.stride == (3 + 2 + 4) * np.dtype(np.float32).itemsize
      assert Z.dtype == (np.float32, 2)
  
      Z = B["color"]
      assert Z.nbytes == 10 * 4 * np.dtype(np.float32).itemsize
      assert Z.offset == (2 + 3) * np.dtype(np.float32).itemsize
      assert Z.size == 10
      assert Z.itemsize == 4 * np.dtype(np.float32).itemsize
      assert Z.stride == (3 + 2 + 4) * np.dtype(np.float32).itemsize
      assert Z.dtype == (np.float32, 4)
  
imports: import unittest
  import numpy
  from vispy.testing import run_tests_if_main
  from vispy.gloo.buffer import Buffer, DataBuffer, DataBufferView, VertexBuffer, IndexBuffer
label_desc: Use image node_id 5 for calling the DataBufferTest obj's underlying member method code with example usage: obj.test_getitem_field() without return types