new_contents: from __future__ import print_function, division, absolute_import
  
  import time
  
  import matplotlib
  matplotlib.use('Agg')  # fix execution of tests involving matplotlib on travis
  import numpy as np
  import cv2
  
  import imgaug as ia
  from imgaug import augmenters as iaa
  from imgaug import parameters as iap
  from imgaug.testutils import array_equal_lists, keypoints_equal, reseed
  
  
  def main():
      time_start = time.time()
  
      test_FastSnowyLandscape()
      # test_Clouds()
      # test_Fog()
      # test_CloudLayer()
      # test_Snowflakes()
      # test_SnowflakesLayer()
  
      time_end = time.time()
      print("<%s> Finished without errors in %.4fs." % (__file__, time_end - time_start,))
  
  
  def test_FastSnowyLandscape():
      reseed()
  
      # check parameters
      aug = iaa.FastSnowyLandscape(lightness_threshold=[100, 200], lightness_multiplier=[1.0, 4.0])
      assert isinstance(aug.lightness_threshold, iap.Choice)
      assert len(aug.lightness_threshold.a) == 2
      assert aug.lightness_threshold.a[0] == 100
      assert aug.lightness_threshold.a[1] == 200
  
      assert isinstance(aug.lightness_multiplier, iap.Choice)
      assert len(aug.lightness_multiplier.a) == 2
      assert np.allclose(aug.lightness_multiplier.a[0], 1.0)
      assert np.allclose(aug.lightness_multiplier.a[1], 4.0)
  
      # basic functionality test
      aug = iaa.FastSnowyLandscape(lightness_threshold=100, lightness_multiplier=2.0)
      image = np.arange(0, 6*6*3).reshape((6, 6, 3)).astype(np.uint8)
      image_hls = cv2.cvtColor(image, cv2.COLOR_RGB2HLS)
      mask = (image_hls[..., 1] < 100)
      expected = np.copy(image_hls).astype(np.float32)
      expected[..., 1][mask] *= 2.0
      expected = np.clip(expected, 0, 255).astype(np.uint8)
      expected = cv2.cvtColor(expected, cv2.COLOR_HLS2RGB)
      observed = aug.augment_image(image)
      assert np.array_equal(observed, expected)
  
      # test when varying lightness_threshold between images
      image = np.arange(0, 6*6*3).reshape((6, 6, 3)).astype(np.uint8)
      image_hls = cv2.cvtColor(image, cv2.COLOR_RGB2HLS)
  
      class _TwoValueParam(iap.StochasticParameter):
          def __init__(self, v1, v2):
              super(_TwoValueParam, self).__init__()
              self.v1 = v1
              self.v2 = v2
  
          def _draw_samples(self, size, random_state):
              arr = np.full(size, self.v1, dtype=np.float32)
              arr[1::2] = self.v2
              return arr
  
      aug = iaa.FastSnowyLandscape(lightness_threshold=_TwoValueParam(75, 125), lightness_multiplier=2.0)
  
      mask = (image_hls[..., 1] < 75)
      expected1 = np.copy(image_hls).astype(np.float64)
      expected1[..., 1][mask] *= 2.0
      expected1 = np.clip(expected1, 0, 255).astype(np.uint8)
      expected1 = cv2.cvtColor(expected1, cv2.COLOR_HLS2RGB)
  
      mask = (image_hls[..., 1] < 125)
      expected2 = np.copy(image_hls).astype(np.float64)
      expected2[..., 1][mask] *= 2.0
      expected2 = np.clip(expected2, 0, 255).astype(np.uint8)
      expected2 = cv2.cvtColor(expected2, cv2.COLOR_HLS2RGB)
  
      observed = aug.augment_images([image] * 4)
  
      assert np.array_equal(observed[0], expected1)
      assert np.array_equal(observed[1], expected2)
      assert np.array_equal(observed[2], expected1)
      assert np.array_equal(observed[3], expected2)
  
      # test when varying lightness_multiplier between images
      aug = iaa.FastSnowyLandscape(lightness_threshold=100, lightness_multiplier=_TwoValueParam(1.5, 2.0))
  
      mask = (image_hls[..., 1] < 100)
      expected1 = np.copy(image_hls).astype(np.float64)
      expected1[..., 1][mask] *= 1.5
      expected1 = np.clip(expected1, 0, 255).astype(np.uint8)
      expected1 = cv2.cvtColor(expected1, cv2.COLOR_HLS2RGB)
  
      mask = (image_hls[..., 1] < 100)
      expected2 = np.copy(image_hls).astype(np.float64)
      expected2[..., 1][mask] *= 2.0
      expected2 = np.clip(expected2, 0, 255).astype(np.uint8)
      expected2 = cv2.cvtColor(expected2, cv2.COLOR_HLS2RGB)
  
      observed = aug.augment_images([image] * 4)
  
      assert np.array_equal(observed[0], expected1)
      assert np.array_equal(observed[1], expected2)
      assert np.array_equal(observed[2], expected1)
      assert np.array_equal(observed[3], expected2)
  
      # test BGR colorspace
      aug = iaa.FastSnowyLandscape(lightness_threshold=100, lightness_multiplier=2.0, from_colorspace="BGR")
      image = np.arange(0, 6*6*3).reshape((6, 6, 3)).astype(np.uint8)
      image_hls = cv2.cvtColor(image, cv2.COLOR_BGR2HLS)
      mask = (image_hls[..., 1] < 100)
      expected = np.copy(image_hls).astype(np.float32)
      expected[..., 1][mask] *= 2.0
      expected = np.clip(expected, 0, 255).astype(np.uint8)
      expected = cv2.cvtColor(expected, cv2.COLOR_HLS2BGR)
      observed = aug.augment_image(image)
      assert np.array_equal(observed, expected)
  
subject: Add test for FastSnowyLandscape