class_docstr: The Lightning Module for speech separation.
  
  Args:
      model (Any): The model to use for the classification task.
      train_loader (DataLoader): the training dataloader.
      val_loader (DataLoader or None): the validation dataloader.
      loss (Any): The loss function to use.
      optim (Any): The optimizer to use.
      metrics (List of methods): The metrics to track, which will be used for both train and validation.
      lr_scheduler (Any or None): The LR Scheduler.
class_docstr_tok: ["The","Lightning","Module","for","speech","separation",".","Args",":","model","(","Any",")",":","The","model","to","use","for","the","classification","task",".","train_loader","(","DataLoader",")",":","the","training","dataloader",".","val_loader","(","DataLoader","or","None",")",":","the","validation","dataloader",".","loss","(","Any",")",":","The","loss","function","to","use",".","optim","(","Any",")",":","The","optimizer","to","use",".","metrics","(","List","of","methods",")",":","The","metrics","to","track",",","which","will","be","used","for","both","train","and","validation",".","lr_scheduler","(","Any","or","None",")",":","The","LR","Scheduler","."]
docstr: Common step for training, validation, and testing.
docstr_tok: ["Common","step","for","training",",","validation",",","and","testing","."]
code: def _step(
      self, batch: Batch, batch_idx: int, phase_type: str
  ) -> Dict[str, Any]:
      """
      Common step for training, validation, and testing.
      """
      mix, src, mask = batch
      pred = self.model(mix)
      loss = self.loss(pred, src, mask)
      self.log(
          f"Losses/{phase_type}_loss",
          loss.item(),
          on_step=True,
          on_epoch=True,
      )
  
      metrics_result = self._compute_metrics(
          pred, src, mix, mask, phase_type
      )
      self.log_dict(metrics_result, on_epoch=True)
  
      return loss
  
imports: from argparse import ArgumentParser
  from pathlib import Path
  from typing import Any, Callable, Dict, List, Mapping, Optional, Tuple, TypedDict, Union
  import torch
  import torchaudio
  from pytorch_lightning import LightningModule, Trainer
  from pytorch_lightning.callbacks import EarlyStopping, ModelCheckpoint
  from torch import nn
  from torch.optim.lr_scheduler import _LRScheduler
  from torch.utils.data import DataLoader
  from utils import metrics
  from utils.dataset import utils
label_desc: Use image node_id 7 for calling the ConvTasNetModule obj's underlying member method code with example usage: obj._step(batch, batch_idx, phase_type) and returns: loss