code: def testOtherDtypes(self, target_dtype, init_dtype):
      target_dist = np.array([0.5, 0.5], dtype=target_dtype)
  
      if init_dtype is None:
          init_dist = None
      else:
          init_dist = np.array([0.5, 0.5], dtype=init_dtype)
  
      dataset = dataset_ops.Dataset.range(10)
      dataset = dataset.rejection_resample(
          class_func=lambda x: x % 2,
          target_dist=target_dist,
          initial_dist=init_dist,
      )
      get_next = self.getNext(dataset, requires_initialization=True)
      self.evaluate(get_next())
  
file_path: tensorflow-upstream/tensorflow/python/data/kernel_tests/rejection_resample_test.py
imports: from absl.testing import parameterized
  import numpy
  from tensorflow.python.data.kernel_tests import test_base
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.framework import combinations
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import random_ops
  from tensorflow.python.ops import string_ops
  from tensorflow.python.platform import test
  from tensorflow.python.util import compat
label_desc: Use image node_id 5 for calling the RejectionResampleTest obj's underlying member method code with example usage: obj.testOtherDtypes(target_dtype, init_dtype) without return types