code: def test_autoscale_colors_for_png(self, shape, expected_image_mode):
      arr = np.random.random(shape)
      scaled, image_mode = vis.autoscale_colors_for_png(arr)
      # Original array should be unchanged.
      self.assertLess(np.max(arr), 1)
      self.assertNotEqual(arr.dtype, np.uint8)
      # Output values have been scaled up and the array's data type changed.
      self.assertGreater(np.max(scaled), 1)
      self.assertEqual(scaled.dtype, np.uint8)
      self.assertEqual(image_mode, expected_image_mode)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import glob
  import os
  from absl.testing import absltest
  from absl.testing import parameterized
  import numpy
  from third_party.nucleus.protos import variants_pb2
  from third_party.nucleus.testing import test_utils
  from third_party.nucleus.util import vis
  from tensorflow.core.example import example_pb2
  from tensorflow.core.example import feature_pb2
label_desc: Use image node_id 8 for calling the VisTest obj's underlying member method code with example usage: obj.test_autoscale_colors_for_png(shape, expected_image_mode) without return types