class_docstr: ClipSampler for Ego4d moments. Will return a fixed `window_sec` window
  around the given annotation, shifting where relevant to account for the end
  of the clip/video.
  
  clip_start/clip_end is added to the annotation dict to facilitate future lookups.
class_docstr_tok: ["ClipSampler","for","Ego4d","moments",".","Will","return","a","fixed","`","window_sec","`","window","around","the","given","annotation",",","shifting","where","relevant","to","account","for","the","end","of","the","clip\/video",".","clip_start\/clip_end","is","added","to","the","annotation","dict","to","facilitate","future","lookups","."]
code: def __call__(
      self,
      last_clip_end_time: float,
      video_duration: float,
      annotation: Dict[str, Any],
  ) -> ClipInfo:
      assert (
          last_clip_end_time is None
          or last_clip_end_time <= video_duration
      ), f"last_clip_end_time ({last_clip_end_time}) > video_duration ({video_duration})"
      start = annotation["label_video_start_sec"]
      end = annotation["label_video_end_sec"]
      if video_duration is not None and end > video_duration:
          log.error(
              f"Invalid video_duration/end_sec: {video_duration} / {end}"
          )
          # If it's small, proceed anyway
          if end > video_duration + 0.1:
              raise Exception(
                  f"Invalid video_duration/end_sec: {video_duration} / {end} ({annotation['video_name']})"  # noqa
              )
      assert end >= start, f"end < start: {end:.2f} / {start:.2f}"
      if self.window_sec > 0:
          s, e = check_window_len(
              start, end, self.window_sec, video_duration
          )
          if s != start or e != end:
              # log.info(
              #     f"clip window slid ({start:.2f}|{end:.2f}) -> ({s:.2f}|{e:.2f})"
              # )
              start = s
              end = e
      annotation["clip_start"] = start
      annotation["clip_end"] = end
      return ClipInfo(start, end, 0, 0, True)
  
file_path: pytorchvideo/pytorchvideo/data/ego4d/utils.py
imports: import json
  import logging
  from abc import ABC, abstractmethod
  from typing import Any, Dict, Tuple
  from iopath.common.file_io import g_pathmgr
  from pytorchvideo.data.clip_sampling import ClipInfo, ClipSampler
  from pytorchvideo.data.utils import get_logger
label_desc: Use image node_id 2 for calling the MomentsClipSampler obj's underlying member method code with example usage: obj.__call__(last_clip_end_time, video_duration, annotation) and returns: ClipInfo