code: def test_serial_with_python(self):
      dataset = lambda _: ((i, i + 1) for i in range(10))
      batches = data.Serial(
          dataset,
          lambda g: map(lambda x: (x[0], x[1] + 1), g),
          lambda g: filter(lambda x: x[0] % 2 == 1, g),
          data.Batch(2),
      )
      batch = next(batches())
      self.assertLen(batch, 2)
      (xs, ys) = batch
      # First tuple after filtering is (1, 3) = (1, 2+1).
      self.assertEqual(xs[0], 1)
      self.assertEqual(ys[0], 3)
      # Second tuple after filtering is (3, 5).
      self.assertEqual(xs[1], 3)
      self.assertEqual(ys[1], 5)
  
imports: import itertools
  import os
  from absl.testing import absltest
  from absl.testing import parameterized
  import numpy
  from trax import data
label_desc: Use image node_id 20 for calling the InputsTest obj's underlying member method code with example usage: obj.test_serial_with_python() without return types