code: def write_audio(
      audio_type,
      audio_file,
      pcm_data,
      audio_format=DEFAULT_FORMAT,
      bitrate=None,
  ):
      if audio_type == AUDIO_TYPE_WAV:
          return write_wav(
              audio_file, pcm_data, audio_format=audio_format
          )
      if audio_type == AUDIO_TYPE_OPUS:
          return write_opus(
              audio_file,
              pcm_data,
              audio_format=audio_format,
              bitrate=bitrate,
          )
      raise ValueError("Unsupported audio type: {}".format(audio_type))
  
imports: import collections
  import ctypes
  import io
  import math
  import numpy
  import os
  import pyogg
  import tempfile
  import wave
  from .helpers import LimitingPool
  from collections import namedtuple
  from .io import open_remote, remove_remote, copy_remote, is_remote_path
label_desc: Use image node_id 22 for calling a global function with example usage: write_audio(audio_type, audio_file, pcm_data, audio_format, bitrate) and returns: write_wav, write_opus