class_docstr: tests for VideoFrame
class_docstr_tok: ["tests","for","VideoFrame"]
code: def test_ndarray_methods(self):
      # pylint: disable=protected-access
      data = np.array([[1, 2, 3, 4], [1, 2, 3, 4], [1, 2, 3, 4]])
      img = VideoFrame(data, "RGB", 100, 1)
      self.assertEqual(img.mode, "RGB")
      self.assertListEqual(list(img.shape), [3, 4])
      self.assertEqual(img.sum(), 30)
      self.assertEqual(img.timestamp, 100)
      self.assertEqual(img.key_frame, 1)
  
      arr = np.zeros((3, 4))
      img_arr = arr.view(VideoFrame)
      self.assertListEqual(list(img_arr.shape), [3, 4])
      self.assertEqual(img_arr.sum(), 0)
      self.assertEqual(img_arr.mode, None)
      self.assertEqual(img_arr.timestamp, None)
      self.assertEqual(img_arr.key_frame, 0)
  
      red = img[:1]
      self.assertListEqual(list(red.shape), [1, 4])
      self.assertEqual(red.mode, "RGB")
  
imports: import unittest
  import numpy
  from towhee.types import VideoFrame
label_desc: Use image node_id 1 for calling the TestVideoFrame obj's underlying member method code with example usage: obj.test_ndarray_methods() without return types