code: def _find_candidates_bins_max_values_subsample(
      histogram: histograms.Histogram, max_candidates: int
  ) -> List[float]:
      """Takes max values of histogram bins with constant step between each other."""
      max_candidates = min(max_candidates, len(histogram.bins))
      ids = np.round(
          np.linspace(0, len(histogram.bins) - 1, num=max_candidates)
      ).astype(int)
      bin_maximums = np.fromiter(
          map(lambda bin: bin.max, histogram.bins), dtype=float
      )
      return bin_maximums[ids].tolist()
  
imports: import logging
  import math
  from numbers import Number
  import pipeline_dp
  from pipeline_dp import dp_computations
  from pipeline_dp import pipeline_backend
  from pipeline_dp import input_validators
  from pipeline_dp.dataset_histograms import histograms
  import analysis
  from analysis import metrics
  from analysis import utility_analysis
  from analysis import dp_strategy_selector
  import dataclasses
  from dataclasses import dataclass
  from typing import Callable, List, Optional, Tuple, Union, Sequence
  from enum import Enum
  import numpy
label_desc: Use image node_id 5 for calling a global function with example usage: _find_candidates_bins_max_values_subsample(histogram, max_candidates) and returns: bin_maximums