Returns a list of JSON objects for each feature in the examples.

    This list is used to drive partial dependence plots in the plugin.

    Args:
      examples: Examples to examine to determine the eligible features.
      num_mutants: The number of mutations to make over each feature.

    Returns:
      A list with a JSON object for each feature.
      Numeric features are represented as {name: observedMin: observedMax:}.
      Categorical features are repesented as {name: samples:[]}.

def get_eligible_features(examples, num_mutants):
  """Returns a list of JSON objects for each feature in the examples.

    This list is used to drive partial dependence plots in the plugin.

    Args:
      examples: Examples to examine to determine the eligible features.
      num_mutants: The number of mutations to make over each feature.

    Returns:
      A list with a JSON object for each feature.
      Numeric features are represented as {name: observedMin: observedMax:}.
      Categorical features are repesented as {name: samples:[]}.
    """
  features_dict = (
      get_numeric_features_to_observed_range(
          examples))

  features_dict.update(
      get_categorical_features_to_sampling(
          examples, num_mutants))

  # Massage the features_dict into a sorted list before returning because
  # Polymer dom-repeat needs a list.
  features_list = []
  for k, v in sorted(features_dict.items()):
    v['name'] = k
    features_list.append(v)
  return features_list