code: def test_ausave_and_auread(
      tmpdir, backend, channel_first, audio, source_type
  ):
      _change_backend(backend)
  
      tmpdir.ensure(dir=True)
      tmppath = tmpdir.join("tmp.wav")
      audio_file_path = tmppath.strpath
  
      if channel_first:
          audio = audio.transpose((1, 0))
  
      # do ausave
      def save_audio_function(audio_file_path):
          audio_utils.ausave(
              audio_file_path, audio, channel_first=channel_first
          )
  
      if check_save_condition(backend, audio):
          save_audio_function(audio_file_path)
      else:
          with pytest.raises(ValueError):
              save_audio_function(audio_file_path)
  
          return True
  
      # do auread
      def read_audio_function(source):
          return audio_utils.auread(source, channel_first=channel_first)
  
      # 'string', 'binaryFileHandler', 'BytesIO', 'StringIO', 'strFileHandler'
      if source_type == "string":
          read_audio = read_audio_function(audio_file_path)
      elif source_type == "binaryFileHandler":
          with open(audio_file_path, "rb") as f:
              read_audio = read_audio_function(f)
      elif source_type == "BytesIO":
          with open(audio_file_path, "rb") as f:
              read_audio = read_audio_function(BytesIO(f.read()))
      elif source_type == "StringIO":
          with pytest.raises(ValueError):
              read_audio = read_audio_function(
                  StringIO(audio_file_path)
              )
          return True
      elif source_type == "strFileHandler":
          with pytest.raises(ValueError):
              with open(audio_file_path, "r") as f:
                  read_audio = read_audio_function(f)
          return True
  
      logger.info(read_audio.shape)
      # ---check size and channels---
      assert read_audio.shape == audio.shape
  
      # ---check dtype---
      assert read_audio.dtype == audio.dtype
  
      # ---check close between before ausave and after auread---
      assert_allclose(audio, read_audio)
  
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 5 for calling a global function with example usage: test_ausave_and_auread(tmpdir, backend, channel_first, audio, source_type) and returns: True, audio_utils, True, True