code: def generate_plots(model, partition):
      r"""Generate plots while running the pipeline.
  
      Parameters
      ----------
      model : alphapy.Model
          The model object with plotting specifications.
      partition : alphapy.Partition
          Reference to the dataset.
  
      Returns
      -------
      None : None
  
      """
  
      logger.info("=" * 80)
      logger.info(
          "Generating Plots for partition: %s", datasets[partition]
      )
  
      # Extract model parameters
  
      calibration_plot = model.specs["calibration_plot"]
      confusion_matrix = model.specs["confusion_matrix"]
      importances = model.specs["importances"]
      learning_curve = model.specs["learning_curve"]
      roc_curve = model.specs["roc_curve"]
  
      # Generate plots
  
      if calibration_plot:
          plot_calibration(model, partition)
      if confusion_matrix:
          plot_confusion_matrix(model, partition)
      if roc_curve:
          plot_roc_curve(model, partition)
      if partition == Partition.train:
          if learning_curve:
              plot_learning_curve(model, partition)
          if importances:
              plot_importance(model, partition)
  
imports: from alphapy.estimators import get_estimators
  from alphapy.globals import BSEP, PSEP, SSEP, USEP
  from alphapy.globals import ModelType
  from alphapy.globals import Partition, datasets
  from alphapy.globals import Q1, Q3
  from alphapy.utilities import remove_list_items
  from bokeh.plotting import figure, show, output_file
  import itertools
  import logging
  import math
  import matplotlib
  import matplotlib.pyplot
  from mpl_toolkits.mplot3d import Axes3D
  import numpy
  import pandas
  from scipy import interp
  import seaborn
  from sklearn.calibration import calibration_curve
  from sklearn.inspection import partial_dependence
  from sklearn.inspection import plot_partial_dependence
  from sklearn.metrics import auc
  from sklearn.metrics import confusion_matrix
  from sklearn.metrics import roc_curve
  from sklearn.model_selection import cross_val_score
  from sklearn.model_selection import learning_curve
  from sklearn.model_selection import StratifiedKFold
  from sklearn.model_selection import train_test_split
  from sklearn.model_selection import validation_curve
  from sklearn.utils.multiclass import unique_labels
label_desc: Use image node_id 2 for calling a global function with example usage: generate_plots(model, partition) without return types