code: def millisec_to_length(
      *,
      frame_length_ms: int = None,
      frame_shift_ms: int = None,
      sample_rate: int = None,
      **kwargs,
  ) -> Tuple[int, int]:
      """Compute hop and window length from milliseconds.
  
      Returns:
          Tuple[int, int]: hop length and window length for STFT.
      """
      factor = frame_length_ms / frame_shift_ms
      assert (
          factor
      ).is_integer(), (
          " [!] frame_shift_ms should divide frame_length_ms"
      )
      win_length = int(frame_length_ms / 1000.0 * sample_rate)
      hop_length = int(win_length / float(factor))
      return win_length, hop_length
  
imports: from io import BytesIO
  from typing import Tuple
  import librosa
  import numpy
  import scipy
  import soundfile
  from librosa import magphase, pyin
label_desc: Use image node_id 2 for calling a global function with example usage: millisec_to_length() and returns: win_length,  hop_length