class_docstr: Bookkeeping system to track the cutoffs.
  
  Rungs are created in reversed order so that we can more easily find
  the correct rung corresponding to the current iteration of the result.
  
  Example:
      >>> trial1, trial2, trial3 = ... # doctest: +SKIP
      >>> b = _Bracket(1, 10, 2, 0) # doctest: +SKIP
      >>> # CONTINUE
      >>> b.on_result(trial1, 1, 2) # doctest: +SKIP
      >>> # CONTINUE
      >>> b.on_result(trial2, 1, 4) # doctest: +SKIP
      >>> # rungs are reversed
      >>> b.cutoff(b._rungs[-1][1]) == 3.0 # doctest: +SKIP
       # STOP
      >>> b.on_result(trial3, 1, 1) # doctest: +SKIP
      >>> b.cutoff(b._rungs[3][1]) == 2.0 # doctest: +SKIP
class_docstr_tok: ["Bookkeeping","system","to","track","the","cutoffs",".","Rungs","are","created","in","reversed","order","so","that","we","can","more","easily","find","the","correct","rung","corresponding","to","the","current","iteration","of","the","result",".","Example",":",">",">",">","trial1",",","trial2",",","trial3","=","...","#","doctest",":","+SKIP",">",">",">","b","=","_Bracket","(","1",",","10",",","2",",","0",")","#","doctest",":","+SKIP",">",">",">","#","CONTINUE",">",">",">","b.on_result","(","trial1",",","1",",","2",")","#","doctest",":","+SKIP",">",">",">","#","CONTINUE",">",">",">","b.on_result","(","trial2",",","1",",","4",")","#","doctest",":","+SKIP",">",">",">","#","rungs","are","reversed",">",">",">","b.cutoff","(","b._rungs","[","-1","]","[","1","]",")","==","3.0","#","doctest",":","+SKIP","#","STOP",">",">",">","b.on_result","(","trial3",",","1",",","1",")","#","doctest",":","+SKIP",">",">",">","b.cutoff","(","b._rungs","[","3","]","[","1","]",")","==","2.0","#","doctest",":","+SKIP"]
code: def cutoff(
      self, recorded
  ) -> Optional[Union[int, float, complex, np.ndarray]]:
      if not recorded:
          return None
      return np.nanpercentile(
          list(recorded.values()), (1 - 1 / self.rf) * 100
      )
  
imports: import logging
  from typing import Dict, Optional, Union, TYPE_CHECKING
  import numpy
  import pickle
  from ray.tune.result import DEFAULT_METRIC
  from ray.tune.schedulers.trial_scheduler import FIFOScheduler, TrialScheduler
  from ray.tune.experiment import Trial
  from ray.util import PublicAPI
label_desc: Use image node_id 2 for calling the _Bracket obj's underlying member method code with example usage: obj.cutoff(recorded) and returns: np, None