class_docstr: Implements a Piecewise Scheduler.
class_docstr_tok: ["Implements","a","Piecewise","Scheduler","."]
code: def _value(self, t: TensorType) -> TensorType:
      # Find t in our list of endpoints.
      for (l_t, l), (r_t, r) in zip(
          self.endpoints[:-1], self.endpoints[1:]
      ):
          # When found, return an interpolation (default: linear).
          if l_t <= t < r_t:
              alpha = float(t - l_t) / (r_t - l_t)
              return self.interpolation(l, r, alpha)
  
      # t does not belong to any of the pieces, return `self.outside_value`.
      assert self.outside_value is not None
      return self.outside_value
  
file_path: ray/rllib/utils/schedules/piecewise_schedule.py
imports: from typing import Callable, List, Optional, Tuple
  from ray.rllib.utils.annotations import override, PublicAPI
  from ray.rllib.utils.framework import try_import_tf
  from ray.rllib.utils.schedules.schedule import Schedule
  from ray.rllib.utils.typing import TensorType
label_desc: Use image node_id 2 for calling the PiecewiseSchedule obj's underlying member method code with example usage: obj._value(t) and returns: self, self