code: def check_random_state_for_discretizer_class(self, DiscretizerClass):
      # ----------------------------------------------------------------------
      # -----------Check if the same random_state produces the same-----------
      # -------------results for different discretizer instances.-------------
      # ----------------------------------------------------------------------
      discretizer = DiscretizerClass(
          self.x, [], self.feature_names, self.y, random_state=10
      )
      x_1 = discretizer.undiscretize(discretizer.discretize(self.x))
  
      discretizer = DiscretizerClass(
          self.x, [], self.feature_names, self.y, random_state=10
      )
      x_2 = discretizer.undiscretize(discretizer.discretize(self.x))
  
      self.assertEqual((x_1 == x_2).sum(), x_1.shape[0] * x_1.shape[1])
  
      discretizer = DiscretizerClass(
          self.x,
          [],
          self.feature_names,
          self.y,
          random_state=np.random.RandomState(10),
      )
      x_1 = discretizer.undiscretize(discretizer.discretize(self.x))
  
      discretizer = DiscretizerClass(
          self.x,
          [],
          self.feature_names,
          self.y,
          random_state=np.random.RandomState(10),
      )
      x_2 = discretizer.undiscretize(discretizer.discretize(self.x))
  
      self.assertEqual((x_1 == x_2).sum(), x_1.shape[0] * x_1.shape[1])
  
      # ----------------------------------------------------------------------
      # ---------Check if two different random_state values produces----------
      # -------different results for different discretizers instances.--------
      # ----------------------------------------------------------------------
      discretizer = DiscretizerClass(
          self.x, [], self.feature_names, self.y, random_state=10
      )
      x_1 = discretizer.undiscretize(discretizer.discretize(self.x))
  
      discretizer = DiscretizerClass(
          self.x, [], self.feature_names, self.y, random_state=20
      )
      x_2 = discretizer.undiscretize(discretizer.discretize(self.x))
  
      self.assertFalse(
          (x_1 == x_2).sum() == x_1.shape[0] * x_1.shape[1]
      )
  
      discretizer = DiscretizerClass(
          self.x,
          [],
          self.feature_names,
          self.y,
          random_state=np.random.RandomState(10),
      )
      x_1 = discretizer.undiscretize(discretizer.discretize(self.x))
  
      discretizer = DiscretizerClass(
          self.x,
          [],
          self.feature_names,
          self.y,
          random_state=np.random.RandomState(20),
      )
      x_2 = discretizer.undiscretize(discretizer.discretize(self.x))
  
      self.assertFalse(
          (x_1 == x_2).sum() == x_1.shape[0] * x_1.shape[1]
      )
  
file_path: lime/lime/tests/test_discretize.py
imports: import unittest
  from unittest import TestCase
  import numpy
  from sklearn.datasets import load_iris
  from lime.discretize import QuartileDiscretizer, DecileDiscretizer, EntropyDiscretizer
label_desc: Use image node_id 2 for calling the TestDiscretize obj's underlying member method code with example usage: obj.check_random_state_for_discretizer_class(DiscretizerClass) without return types