code: def index_to_prob(index, n_index):
      """Convert 0-based index in the given range to cumulative probability."""
      ele_prob = 1 / n_index
      # Center the value in its probability bucket.
      return (index + 0.5) * ele_prob
  
imports: import math
  from keras_tuner import protos
label_desc: Use image node_id 4 for calling a global function with example usage: index_to_prob(index, n_index) and returns: unknown