code: def load_feature_map(model, directory):
      r"""Load the feature map from storage. By default, the
      most recent feature map is loaded into memory.
  
      Parameters
      ----------
      model : alphapy.Model
          The model object to contain the feature map.
      directory : str
          Full directory specification of the feature map's location.
  
      Returns
      -------
      model : alphapy.Model
          The model object containing the feature map.
  
      """
  
      # Locate the feature map and load it
  
      try:
          search_dir = SSEP.join([directory, "model"])
          file_name = most_recent_file(search_dir, "feature_map_*.pkl")
          logger.info("Loading feature map from %s", file_name)
          # load the feature map
          feature_map = joblib.load(file_name)
          model.feature_map = feature_map
      except:
          logging.error("Could not find feature map in %s", search_dir)
  
      # Return the model with the feature map
      return model
  
imports: from alphapy.estimators import scorers
  from alphapy.estimators import xgb_score_map
  from alphapy.features import feature_scorers
  from alphapy.frame import read_frame
  from alphapy.frame import write_frame
  from alphapy.globals import Encoders
  from alphapy.globals import ModelType
  from alphapy.globals import Objective
  from alphapy.globals import Partition, datasets
  from alphapy.globals import PSEP, SSEP, USEP
  from alphapy.globals import SamplingMethod
  from alphapy.globals import Scalers
  from alphapy.utilities import get_datestamp
  from alphapy.utilities import most_recent_file
  from copy import copy
  from datetime import datetime
  import itertools
  import joblib
  from keras.models import load_model
  import logging
  import numpy
  import pandas
  from sklearn.calibration import CalibratedClassifierCV
  from sklearn.linear_model import LogisticRegression
  from sklearn.linear_model import RidgeCV
  from sklearn.metrics import accuracy_score
  from sklearn.metrics import auc
  from sklearn.metrics import average_precision_score
  from sklearn.metrics import balanced_accuracy_score
  from sklearn.metrics import brier_score_loss
  from sklearn.metrics import classification_report
  from sklearn.metrics import cohen_kappa_score
  from sklearn.metrics import confusion_matrix
  from sklearn.metrics import explained_variance_score
  from sklearn.metrics import f1_score
  from sklearn.metrics import log_loss
  from sklearn.metrics import mean_absolute_error
  from sklearn.metrics import mean_squared_error
  from sklearn.metrics import mean_squared_log_error
  from sklearn.metrics import median_absolute_error
  from sklearn.metrics import precision_score
  from sklearn.metrics import r2_score
  from sklearn.metrics import recall_score
  from sklearn.metrics import roc_auc_score
  from sklearn.metrics import roc_curve
  from sklearn.metrics.cluster import adjusted_rand_score
  from sklearn.model_selection import cross_val_score
  from sklearn.model_selection import train_test_split
  import sys
  import yaml
label_desc: Use image node_id 4 for calling a global function with example usage: load_feature_map(model, directory) and returns: model