class_docstr: TestDataLoader
code: def test_register_ops(self):
      @register
      class Seq(PyOperator):  # pylint: disable=unused-variable
          def __init__(self, size):
              self._size = size
  
          def __call__(self):
              yield from range(self._size)
  
      size = 100
      p = (
          pipe.input("num")
          .map("num", "ret", lambda x: x + 1)
          .output("ret")
      )
      expect = list(range(1, size + 1))
      for i, data in enumerate(DataLoader(ops.Seq(size))):
          self.assertEqual(p(data).to_list()[0][0], expect[i])
  
      res = []
      for data in DataLoader(ops.Seq(size), batch_size=7):
          for ret in p.batch(data):
              res.append(ret.to_list()[0][0])
      self.assertEqual(res, expect)
  
imports: import unittest
  from towhee import DataLoader, pipe, ops, register
  from towhee.operator.base import PyOperator
label_desc: Use image node_id 2 for calling the TestDataLoader obj's underlying member method code with example usage: obj.test_register_ops() without return types