code: def func(self, split, iterator):
      self.initRandomGenerator(split)
      size = self._split_sample_size[split]
      for obj in iterator:
          self._counter += 1
          if len(self._sample) < size:
              self._sample.append(obj)
              continue
  
          randint = self._random.randint(1, self._counter)
          if randint <= size:
              self._sample[randint - 1] = obj
  
      return self._sample
  
imports: import logging
  import struct
  import typing
  from typing import Callable, Iterable, Tuple, Optional, Any
  import pyspark
  from pyspark.rddsampler import RDDSamplerBase
  from fate.arch import URI
  from fate.arch.computing.api import KVTable, ComputingEngine, K, V
  from fate.arch.computing.api._table import _lifted_reduce_to_serdes, get_serdes_by_type
  from ._materialize import materialize, unmaterialize
label_desc: Use image node_id 2 for calling the _ReservoirSample obj's underlying member method code with example usage: obj.func(split, iterator) and returns: self