docstr: Format kwargs for `fit` method.
  
  Parameters
  ----------
  kwargs
      dictionary of Kwargs to format. See `fit` method for details.
  
  Returns
  -------
  Formatted kwargs.
docstr_tok: ["Format","kwargs","for","`","fit","`","method",".","Parameters","--","--","--","--","--","kwargs","dictionary","of","Kwargs","to","format",".","See","`","fit","`","method","for","details",".","Returns","--","--","--","-","Formatted","kwargs","."]
code: def format_fit_kwargs(self, fit_kwargs: Dict) -> Dict:
      """Format kwargs for `fit` method.
  
      Parameters
      ----------
      kwargs
          dictionary of Kwargs to format. See `fit` method for details.
  
      Returns
      -------
      Formatted kwargs.
      """
      return dict(
          optimizer=get_optimizer(fit_kwargs.get("optimizer")),
          learning_rate=fit_kwargs.get("learning_rate", 0.1),
          batch_size=fit_kwargs.get("batch_size", None),
          max_epochs=(lambda v: 10 if v is None else v)(
              fit_kwargs.get("max_epochs", None)
          ),
          verbose=fit_kwargs.get("verbose", 0),
          tol=fit_kwargs.get("tol", 1e-3),
          n_iter_no_change=fit_kwargs.get("n_iter_no_change", 25),
      )
  
file_path: alibi-detect/alibi_detect/od/pytorch/gmm.py
imports: from typing import Dict, Type
  from tqdm import tqdm
  import torch
  from torch.utils.data import DataLoader
  from alibi_detect.utils.pytorch.data import TorchDataset
  from alibi_detect.od.pytorch.base import TorchOutlierDetector
  from alibi_detect.models.pytorch.gmm import GMMModel
  from alibi_detect.utils.pytorch.misc import get_optimizer
  from alibi_detect.utils._types import TorchDeviceType
label_desc: Use image node_id 3 for calling the GMMTorch obj's underlying member method code with example usage: obj.format_fit_kwargs(fit_kwargs) and returns: dict