class_docstr: Test for RGBHistogramEquilisationLayer
code: def test_equilisation(self):
      cv2 = require_module("cv2", mandatory=False)
  
      if cv2 is None:
          self.skipTest("requires cv2 module")
          return
  
      def _get_histogram(img):
          inten = (
              cv2.cvtColor(img[::-1], cv2.COLOR_BGR2YUV)[..., 0] * 255
          )
  
          return np.histogram(inten, 32, [0, 256])[0]
  
      hist_before = _get_histogram(IMAGE_DATA)
  
      layer = RGBHistogramEquilisationLayer(image_name="image")
      orig_shape = list(IMAGE_DATA.shape)
      input_shape = orig_shape[:2] + [1] * 2 + [3]
      img, _ = layer(IMAGE_DATA.reshape(input_shape))
  
      hist_after = _get_histogram(img.reshape(orig_shape))
  
      self.assertGreater(
          hist_before.astype(np.float32).std(),
          hist_after.astype(np.float32).std(),
      )
  
      img, _ = layer({"image": IMAGE_DATA.reshape(input_shape)})
  
      hist_after = _get_histogram(img["image"].reshape(orig_shape))
  
      self.assertGreater(
          hist_before.astype(np.float32).std(),
          hist_after.astype(np.float32).std(),
      )
  
      img = (255 * IMAGE_DATA).astype(np.uint8)
      img, _ = layer({"image": IMAGE_DATA.reshape(input_shape)})
  
      hist_after = _get_histogram(img["image"].reshape(orig_shape))
  
      self.assertGreater(
          hist_before.astype(np.float32).std(),
          hist_after.astype(np.float32).std(),
      )
  
imports: import numpy
  import tensorflow
  from niftynet.layer.rgb_histogram_equilisation import RGBHistogramEquilisationLayer
  from niftynet.utilities.util_import import require_module
  from tests.niftynet_testcase import NiftyNetTestCase
label_desc: Use image node_id 1 for calling the RGBEquilisationTest obj's underlying member method code with example usage: obj.test_equilisation() and returns: np