class_docstr: Evenly splits the video into clips_per_video increments and samples clips of size
  clip_duration at these increments.
class_docstr_tok: ["Evenly","splits","the","video","into","clips_per_video","increments","and","samples","clips","of","size","clip_duration","at","these","increments","."]
docstr: Args:
      last_clip_end_time (float): Not used for ConstantClipsPerVideoSampler.
      video_duration: (float): the duration (in seconds) for the video that's
          being sampled.
      annotation (Dict): Not used by this sampler.
  Returns:
      a named-tuple `ClipInfo`: includes the clip information of (clip_start_time,
          clip_end_time, clip_index, aug_index, is_last_clip). The times are in seconds.
          is_last_clip is True after clips_per_video clips have been sampled or the end
          of the video is reached.
docstr_tok: ["Args",":","last_clip_end_time","(","float",")",":","Not","used","for","ConstantClipsPerVideoSampler",".","video_duration",":","(","float",")",":","the","duration","(","in","seconds",")","for","the","video","that's","being","sampled",".","annotation","(","Dict",")",":","Not","used","by","this","sampler",".","Returns",":","a","named-tuple","`","ClipInfo","`",":","includes","the","clip","information","of","(","clip_start_time",",","clip_end_time",",","clip_index",",","aug_index",",","is_last_clip",")",".","The","times","are","in","seconds",".","is_last_clip","is","True","after","clips_per_video","clips","have","been","sampled","or","the","end","of","the","video","is","reached","."]
code: def __call__(
      self,
      last_clip_end_time: Optional[float],
      video_duration: float,
      annotation: Dict[str, Any],
  ) -> ClipInfo:
      """
      Args:
          last_clip_end_time (float): Not used for ConstantClipsPerVideoSampler.
          video_duration: (float): the duration (in seconds) for the video that's
              being sampled.
          annotation (Dict): Not used by this sampler.
      Returns:
          a named-tuple `ClipInfo`: includes the clip information of (clip_start_time,
              clip_end_time, clip_index, aug_index, is_last_clip). The times are in seconds.
              is_last_clip is True after clips_per_video clips have been sampled or the end
              of the video is reached.
  
      """
      max_possible_clip_start = Fraction(
          max(video_duration - self._clip_duration, 0)
      )
      uniform_clip = Fraction(
          max_possible_clip_start, max(self._clips_per_video - 1, 1)
      )
      clip_start_sec = uniform_clip * self._current_clip_index
      clip_index = self._current_clip_index
      aug_index = self._current_aug_index
  
      self._current_aug_index += 1
      if self._current_aug_index >= self._augs_per_clip:
          self._current_clip_index += 1
          self._current_aug_index = 0
  
      # Last clip is True if sampled self._clips_per_video or if end of video is reached.
      is_last_clip = False
      if (
          self._current_clip_index >= self._clips_per_video
          or uniform_clip * self._current_clip_index
          > max_possible_clip_start
      ):
          self._current_clip_index = 0
          is_last_clip = True
  
      if is_last_clip:
          self.reset()
  
      return ClipInfo(
          clip_start_sec,
          clip_start_sec + self._clip_duration,
          clip_index,
          aug_index,
          is_last_clip,
      )
  
imports: import random
  from abc import ABC, abstractmethod
  from fractions import Fraction
  from typing import Any, Dict, List, NamedTuple, Optional, Tuple, Union
label_desc: Use image node_id 2 for calling the ConstantClipsPerVideoSampler obj's underlying member method code with example usage: obj.__call__(last_clip_end_time, video_duration, annotation) and returns: ClipInfo