code: def _shrink_towards_best(
      objective_function,
      simplex,
      best_index,
      shrinkage,
      batch_evaluate_objective,
  ):
      """Shrinks the simplex around the best vertex."""
  
      # If the contraction step fails to improve the average objective enough,
      # the simplex is shrunk towards the best vertex.
      best_vertex = simplex[best_index]
      shrunk_simplex = best_vertex + shrinkage * (simplex - best_vertex)
      objective_at_shrunk_simplex, evals = _evaluate_objective_multiple(
          objective_function, shrunk_simplex, batch_evaluate_objective
      )
      return (False, shrunk_simplex, objective_at_shrunk_simplex, evals)
  
imports: import collections
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import tensorshape_util
label_desc: Use image node_id 7 for calling a global function with example usage: _shrink_towards_best(objective_function, simplex, best_index, shrinkage, batch_evaluate_objective) and returns: False,  shrunk_simplex,  objective_at_shrunk_simplex,  evals