code: def plot_model(
      estimator,
      plot: str = "residuals",
      scale: float = 1,
      save: bool = False,
      fold: Optional[Union[int, Any]] = None,
      fit_kwargs: Optional[dict] = None,
      plot_kwargs: Optional[dict] = None,
      groups: Optional[Union[str, Any]] = None,
      verbose: bool = True,
      display_format: Optional[str] = None,
  ) -> Optional[str]:
      """
      This function analyzes the performance of a trained model on holdout set.
      It may require re-training the model in certain cases.
  
  
      Example
      --------
      >>> from pycaret.datasets import get_data
      >>> boston = get_data('boston')
      >>> from pycaret.regression import *
      >>> exp_name = setup(data = boston,  target = 'medv')
      >>> lr = create_model('lr')
      >>> plot_model(lr, plot = 'residual')
  
  
      estimator: scikit-learn compatible object
          Trained model object
  
  
      plot: str, default = 'residual'
          List of available plots (ID - Name):
  
          * 'pipeline' - Schematic drawing of the preprocessing pipeline
          * 'residuals_interactive' - Interactive Residual plots
          * 'residuals' - Residuals Plot
          * 'error' - Prediction Error Plot
          * 'cooks' - Cooks Distance Plot
          * 'rfe' - Recursive Feat. Selection
          * 'learning' - Learning Curve
          * 'vc' - Validation Curve
          * 'manifold' - Manifold Learning
          * 'feature' - Feature Importance
          * 'feature_all' - Feature Importance (All)
          * 'parameter' - Model Hyperparameter
          * 'tree' - Decision Tree
  
  
      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.
  
  
      fold: int or scikit-learn compatible CV generator, default = None
          Controls cross-validation. If None, the CV generator in the ``fold_strategy``
          parameter of the ``setup`` function is used. When an integer is passed,
          it is interpreted as the 'n_splits' parameter of the CV generator in the
          ``setup`` function.
  
  
      fit_kwargs: dict, default = {} (empty dict)
          Dictionary of arguments passed to the fit method of the model.
  
  
      plot_kwargs: dict, default = {} (empty dict)
          Dictionary of arguments passed to the visualizer class.
              - pipeline: fontsize -> int
  
  
      plot_kwargs: dict, default = {} (empty dict)
          Dictionary of arguments passed to the visualizer class.
              - pipeline: fontsize -> int
  
  
      groups: str or array-like, with shape (n_samples,), default = None
          Optional group labels when GroupKFold is used for the cross validation.
          It takes an array with shape (n_samples, ) where n_samples is the number
          of rows in training dataset. When string is passed, it is interpreted as
          the column name in the dataset containing group labels.
  
  
      verbose: bool, default = True
          When set to False, progress bar is not displayed.
  
  
      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(
          estimator=estimator,
          plot=plot,
          scale=scale,
          save=save,
          fold=fold,
          fit_kwargs=fit_kwargs,
          plot_kwargs=plot_kwargs,
          groups=groups,
          verbose=verbose,
          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.internal.parallel.parallel_backend import ParallelBackend
  from pycaret.loggers.base_logger import BaseLogger
  from pycaret.regression.oop import RegressionExperiment
  from pycaret.utils.constants import DATAFRAME_LIKE, SEQUENCE_LIKE, TARGET_LIKE
  from pycaret.utils.generic import check_if_global_is_not_none
label_desc: Use image node_id 10 for calling a global function with example usage: plot_model(estimator, plot, scale, save, fold, fit_kwargs, plot_kwargs, groups, verbose, display_format) and returns: _CURRENT_EXPERIMENT