code: def func_best_model(
      scan_object,
      metric="val_acc",
      asc=False,
      saved=False,
      custom_objects=None,
  ):
      """Picks the best model based on a given metric and
      returns the index number for the model.
  
      scan_object | object | The object that is returned from Scan()
                             upon completion.
      metric | str | The metric to be used for picking the best model.
      asc | bool | Make this True for metrics that are to be minimized
                   (e.g. loss), and False when the metric is to be
                   maximized (e.g. acc).
      saved | bool | if a model saved on local machine should be used.
      custom_objects | dict | if the model has a custom object, pass it here.
  
      NOTE: for loss 'asc' should be True"""
  
      import warnings as warnings
  
      warnings.simplefilter("ignore")
  
      from ..utils.best_model import best_model, activate_model
  
      model_no = best_model(scan_object, metric, asc)
      out = activate_model(scan_object, model_no, saved, custom_objects)
  
      return out
  
label_desc: Use image node_id 1 for calling a global function with example usage: func_best_model(scan_object, metric, asc, saved, custom_objects) and returns: out