docstr: Tests loop from linear RGB to sRGB and back for random inputs.
docstr_tok: ["Tests","loop","from","linear","RGB","to","sRGB","and","back","for","random","inputs","."]
code: def test_cycle_linear_rgb_srgb_linear_rgb_for_random_input(self):
      """Tests loop from linear RGB to sRGB and back for random inputs."""
      tensor_size = np.random.randint(3)
      tensor_shape = np.random.randint(
          1, 10, size=(tensor_size)
      ).tolist()
      linear_input = np.random.uniform(size=tensor_shape + [3])
  
      srgb_output = srgb.from_linear_rgb(linear_input)
      linear_reverse = linear_rgb.from_srgb(srgb_output)
  
      self.assertAllClose(linear_input, linear_reverse)
  
file_path: graphics/tensorflow_graphics/image/color_space/tests/srgb_test.py
imports: from absl.testing import flagsaver
  from absl.testing import parameterized
  import numpy
  from tensorflow_graphics.image.color_space import linear_rgb
  from tensorflow_graphics.image.color_space import srgb
  from tensorflow_graphics.util import test_case
label_desc: Use image node_id 1 for calling the SrgbTest obj's underlying member method code with example usage: obj.test_cycle_linear_rgb_srgb_linear_rgb_for_random_input() without return types