code: def get_best_step(results, objective):
      # Average the best epochs if multiple executions.
      if isinstance(results, list):
          return int(
              statistics.mean(
                  [get_best_step(elem, objective) for elem in results]
              )
          )
  
      # A History.
      if isinstance(results, keras.callbacks.History):
          _, best_epoch = _get_best_value_and_best_epoch_from_history(
              results, objective
          )
          return best_epoch
  
      return 0
  
imports: import collections
  import statistics
  import numpy
  from keras_tuner import backend
  from keras_tuner import errors
  from keras_tuner.backend import config
  from keras_tuner.backend import keras
  from keras_tuner.engine import hyperparameters
  from keras_tuner.engine import objective
label_desc: Use image node_id 5 for calling a global function with example usage: get_best_step(results, objective) and returns: int, int, best_epoch