code: def plot_model(
      model,
      plot: str = "tsne",
      feature: Optional[str] = None,
      label: bool = False,
      scale: float = 1,
      save: bool = False,
      display_format: Optional[str] = None,
  ) -> Optional[str]:
      """
      This function analyzes the performance of a trained model.
  
  
      Example
      -------
      >>> from pycaret.datasets import get_data
      >>> anomaly = get_data('anomaly')
      >>> from pycaret.anomaly import *
      >>> exp_name = setup(data = anomaly)
      >>> knn = create_model('knn')
      >>> plot_model(knn, plot = 'tsne')
  
  
      model: scikit-learn compatible object
          Trained Model Object
  
  
      plot: str, default = 'tsne'
          List of available plots (ID - Name):
  
          * 'tsne' - t-SNE (3d) Dimension Plot
          * 'umap' - UMAP Dimensionality Plot
  
  
      feature: str, default = None
          Feature to be used as a hoverover tooltip and/or label when the ``label``
          param is set to True. When feature is None, first column of the dataset
          is used.
  
  
      label: bool, default = False
          Name of column to be used as data labels.
  
  
      scale: float, default = 1
          The resolution scale of the figure.
  
  
      save: bool, default = False
          When set to True, plot is saved in the current working directory.
  
  
      display_format: str, default = None
          To display plots in Streamlit (https://www.streamlit.io/), set this to 'streamlit'.
          Currently, not all plots are supported.
  
  
      Returns:
          Path to saved file, if any.
  
      """
      return _CURRENT_EXPERIMENT.plot_model(
          model,
          plot=plot,
          feature_name=feature,
          label=label,
          scale=scale,
          save=save,
          display_format=display_format,
      )
  
imports: import logging
  import os
  from typing import Any, BinaryIO, Callable, Dict, List, Optional, Union
  import pandas
  from joblib.memory import Memory
  from pycaret.anomaly.oop import AnomalyExperiment
  from pycaret.loggers.base_logger import BaseLogger
  from pycaret.utils.constants import DATAFRAME_LIKE, SEQUENCE_LIKE
  from pycaret.utils.generic import check_if_global_is_not_none
label_desc: Use image node_id 4 for calling a global function with example usage: plot_model(model, plot, feature, label, scale, save, display_format) and returns: _CURRENT_EXPERIMENT