code: def test_multiply_volume_audioclip(
      sound_type,
      factor,
      duration,
      start_time,
      end_time,
  ):
      if sound_type == "stereo":
          make_frame = lambda t: np.array(
              [
                  np.sin(440 * 2 * np.pi * t),
                  np.sin(160 * 2 * np.pi * t),
              ]
          ).T.copy(order="C")
      else:
          make_frame = lambda t: [np.sin(440 * 2 * np.pi * t)]
  
      clip = AudioClip(
          make_frame,
          duration=duration if duration else 0.1,
          fps=22050,
      )
      clip_array = clip.to_soundarray()
  
      clip_transformed = multiply_volume(
          clip,
          factor,
          start_time=start_time,
          end_time=end_time,
      )
      clip_transformed_array = clip_transformed.to_soundarray()
  
      assert len(clip_transformed_array)
  
      if hasattr(clip_array, "shape") and len(clip_array.shape) > 1:
          # stereo clip
          left_channel_transformed = clip_transformed_array[:, 0]
          right_channel_transformed = clip_transformed_array[:, 1]
  
          if start_time is None and end_time is None:
              expected_left_channel_transformed = (
                  clip_array[:, 0] * factor
              )
              expected_right_channel_transformed = (
                  clip_array[:, 1] * factor
              )
          else:
              start_time = (
                  convert_to_seconds(start_time)
                  if start_time
                  else clip.start
              )
              end_time = (
                  convert_to_seconds(end_time) if end_time else clip.end
              )
  
              expected_left_channel_transformed = np.array([])
              expected_right_channel_transformed = np.array([])
              for i, frame in enumerate(clip_array):
                  t = i / clip.fps
                  transformed_frame = frame * (
                      factor if start_time <= t <= end_time else 1
                  )
                  expected_left_channel_transformed = np.append(
                      expected_left_channel_transformed,
                      transformed_frame[0],
                  )
                  expected_right_channel_transformed = np.append(
                      expected_right_channel_transformed,
                      transformed_frame[1],
                  )
  
          assert len(left_channel_transformed)
          assert len(expected_left_channel_transformed)
          assert np.array_equal(
              left_channel_transformed,
              expected_left_channel_transformed,
          )
  
          assert len(right_channel_transformed)
          assert len(expected_right_channel_transformed)
          assert np.array_equal(
              right_channel_transformed,
              expected_right_channel_transformed,
          )
  
      else:
          # mono clip
  
          if start_time is None and end_time is None:
              expected_clip_transformed_array = clip_array * factor
          else:
              start_time = (
                  convert_to_seconds(start_time)
                  if start_time
                  else clip.start
              )
              end_time = (
                  convert_to_seconds(end_time) if end_time else clip.end
              )
  
              expected_clip_transformed_array = np.array([])
              for i, frame in enumerate(clip_array[0]):
                  t = i / clip.fps
                  transformed_frame = frame * (
                      factor if start_time <= t <= end_time else 1
                  )
                  expected_clip_transformed_array = np.append(
                      expected_clip_transformed_array,
                      transformed_frame,
                  )
              expected_clip_transformed_array = np.array(
                  [
                      expected_clip_transformed_array,
                  ]
              )
  
          assert len(expected_clip_transformed_array)
  
          assert np.array_equal(
              expected_clip_transformed_array,
              clip_transformed_array,
          )
  
imports: import decimal
  import importlib
  import math
  import numbers
  import os
  import random
  import sys
  import numpy
  import pytest
  from moviepy import AudioClip, AudioFileClip, BitmapClip, ColorClip, VideoClip, VideoFileClip
  from moviepy.audio.fx import audio_delay, audio_fadein, audio_fadeout, audio_normalize, multiply_stereo_volume, multiply_volume
  from moviepy.tools import convert_to_seconds
  from moviepy.video.fx import blackwhite, crop, even_size, fadein, fadeout, freeze, freeze_region, invert_colors, loop, lum_contrast, make_loopable, margin, mask_and, mask_or, mirror_x, mirror_y, multiply_color, multiply_speed, resize, rotate, time_mirror, time_symmetrize
label_desc: Use image node_id 35 for calling a global function with example usage: test_multiply_volume_audioclip(sound_type, factor, duration, start_time, end_time) without return types