code: def get_exp_probs_from_fitness(
      fitness_vals, scaling_param=None, scaling_const=None
  ):
      """Returns sampling probabilities from fitness values; the fitness values are
      exponentiated and used as probabilities.
      """
      fitness_vals = np.array(fitness_vals)
      if scaling_param is None:
          scaling_const = (
              scaling_const if scaling_const is not None else 0.5
          )
          scaling_param = scaling_const * (fitness_vals.std() + 0.0001)
      mean_param = fitness_vals.mean()
      exp_probs = np.exp((fitness_vals - mean_param) / scaling_param)
      return exp_probs / exp_probs.sum()
  
imports: from __future__ import print_function
  from __future__ import division
  import numpy
  from scipy.sparse import dok_matrix
  from scipy.linalg import solve_triangular
label_desc: Use image node_id 31 for calling a global function with example usage: get_exp_probs_from_fitness(fitness_vals, scaling_param, scaling_const) and returns: unknown