code: def write_wave_file(signal, filename, sample_rate=None):
      """
      Write the signal to disk as a .wav file.
  
      Parameters
      ----------
      signal : numpy array or Signal
          The signal to be written to file.
      filename : str
          Name of the file.
      sample_rate : int, optional
          Sample rate of the signal [Hz].
  
      Returns
      -------
      filename : str
          Name of the file.
  
      Notes
      -----
      `sample_rate` can be 'None' if `signal` is a :class:`Signal` instance. If
      set, the given `sample_rate` is used instead of the signal's sample rate.
      Must be given if `signal` is a ndarray.
  
      """
      from scipy.io import wavfile
  
      if isinstance(signal, Signal) and sample_rate is None:
          sample_rate = int(signal.sample_rate)
      wavfile.write(filename, rate=sample_rate, data=signal)
      return filename
  
imports: from __future__ import absolute_import, division, print_function
  import errno
  import os
  import subprocess
  import sys
  import tempfile
  import numpy
  from ..audio.signal import Signal
  from ..utils import string_types, file_types
label_desc: Use image node_id 10 for calling a global function with example usage: write_wave_file(signal, filename, sample_rate) and returns: filename