code: def evaluate(
      adapter: str = AudioAdapterOption,
      output_path: str = AudioOutputOption,
      params_filename: str = ModelParametersOption,
      mus_dir: str = MUSDBDirectoryOption,
      mwf: bool = MWFOption,
      verbose: bool = VerboseOption,
  ) -> Dict:
      """
      Evaluate a model on the musDB test dataset
      """
      import numpy as np
  
      configure_logger(verbose)
      try:
          import musdb  # type: ignore
          import museval  # type: ignore
      except ImportError:
          logger.error("Extra dependencies musdb and museval not found")
          logger.error("Please install musdb and museval first, abort")
          raise Exit(10)
      # Separate musdb sources.
      songs = glob(join(mus_dir, EVALUATION_SPLIT, "*/"))
      mixtures = [join(song, EVALUATION_MIXTURE) for song in songs]
      audio_output_directory = join(
          output_path, EVALUATION_AUDIO_DIRECTORY
      )
      separate(
          deprecated_files=None,
          files=mixtures,
          adapter=adapter,
          bitrate="128k",
          codec=Codec.WAV,
          duration=600.0,
          offset=0,
          output_path=join(audio_output_directory, EVALUATION_SPLIT),
          filename_format="{foldername}/{instrument}.{codec}",
          params_filename=params_filename,
          mwf=mwf,
          verbose=verbose,
      )
      # Compute metrics with musdb.
      metrics_output_directory = join(
          output_path, EVALUATION_METRICS_DIRECTORY
      )
      logger.info("Starting musdb evaluation (this could be long) ...")
      dataset = musdb.DB(
          root=mus_dir, is_wav=True, subsets=[EVALUATION_SPLIT]
      )
      museval.eval_mus_dir(
          dataset=dataset,
          estimates_dir=audio_output_directory,
          output_dir=metrics_output_directory,
      )
      logger.info("musdb evaluation done")
      # Compute and pretty print median metrics.
      metrics = _compile_metrics(metrics_output_directory)
      for instrument, metric in metrics.items():
          logger.info(f"{instrument}:")
          for metric, value in metric.items():
              logger.info(f"{metric}: {np.median(value):.3f}")
      return metrics
  
file_path: spleeter/spleeter/__main__.py
imports: import json
  from functools import partial
  from glob import glob
  from itertools import product
  from os.path import join
  from typing import Dict, List, Optional, Tuple
  from typer import Exit, Typer
  from .None import SpleeterError
  from .audio import Codec
  from .options import AudioAdapterOption, AudioBitrateOption, AudioCodecOption, AudioDurationOption, AudioInputArgument, AudioInputOption, AudioOffsetOption, AudioOutputOption, FilenameFormatOption, ModelParametersOption, MUSDBDirectoryOption, MWFOption, TrainingDataDirectoryOption, VerboseOption, VersionOption
  from .utils.logging import configure_logger, logger
label_desc: Use image node_id 5 for calling a global function with example usage: evaluate(adapter, output_path, params_filename, mus_dir, mwf, verbose) and returns: metrics