code: def test_minmax_auto_scale(audio, out_datatype):
      rescaled = audio_utils.minmax_auto_scale(audio, out_datatype)
  
      # check dtype
      if str(out_datatype).find("int") > -1:
          scale_max = np.iinfo(out_datatype).max
          scale_min = np.iinfo(out_datatype).min
      else:
          scale_max = np.finfo(out_datatype).max
          scale_min = np.finfo(out_datatype).min
  
      assert rescaled.dtype == out_datatype
  
      # check the range of values
      assert rescaled.max() <= scale_max
      assert rescaled.min() >= scale_min
  
      # check if correctly scaled
      reverted = audio_utils.common.rescale_intensity(
          rescaled,
          rescaled.min(),
          rescaled.max(),
          audio.min(),
          audio.max(),
          audio.dtype,
      )
      assert_allclose(audio, reverted, atol=1 / 2**4)
  
file_path: nnabla/python/test/utils/test_audio_utils.py
imports: from __future__ import division
  import pytest
  import numpy
  from six import BytesIO, StringIO
  from nnabla.logger import logger
  from nnabla.testing import assert_allclose
label_desc: Use image node_id 4 for calling a global function with example usage: test_minmax_auto_scale(audio, out_datatype) without return types