code: def local_group_delay(phase):
      """
      Returns the local group delay of the phase of a signal.
  
      Parameters
      ----------
      phase : numpy array, shape (num_frames, frame_size)
          Phase of the STFT of a signal.
  
      Returns
      -------
      lgd : numpy array
          Local group delay of the phase.
  
      """
      # check for correct shape of input
      if phase.ndim != 2:
          raise ValueError("phase must be a 2D array")
      # unwrap phase
      unwrapped_phase = np.unwrap(phase)
      # local group delay is the derivative over frequency
      unwrapped_phase[:, :-1] -= unwrapped_phase[:, 1:]
      # set the highest frequency to 0
      unwrapped_phase[:, -1] = 0
      # return the local group delay
      return unwrapped_phase
  
imports: from __future__ import absolute_import, division, print_function
  import warnings
  import numpy
  import scipy.fftpack
  from ..processors import Processor
  from .signal import Signal, FramedSignal
label_desc: Use image node_id 4 for calling a global function with example usage: local_group_delay(phase) and returns: unwrapped_phase