code: def get_partition_data(model, partition):
      r"""Get the X, y pair for a given model and partition
  
      Parameters
      ----------
      model : alphapy.Model
          The model object with partition data.
      partition : alphapy.Partition
          Reference to the dataset.
  
      Returns
      -------
      X : numpy array
          The feature matrix.
      y : numpy array
          The target vector.
  
      Raises
      ------
      TypeError
          Partition must be train or test.
  
      """
  
      if partition == Partition.train:
          X = model.X_train
          y = model.y_train
      elif partition == Partition.test:
          X = model.X_test
          y = model.y_test
      else:
          raise TypeError("Partition must be train or test")
  
      return X, y
  
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 1 for calling a global function with example usage: get_partition_data(model, partition) and returns: X,  y