class_docstr: Wrapper for Ego4D IMU data loads, assuming one csv per video_uid at the provided path.
code: def _get_imu_window(
      self,
      window_start: float,
      window_end: float,
      signal: np.ndarray,
      timestamps: np.ndarray,
      sampling_rate: float,
  ) -> Dict[str, Any]:
      start_id = bisect_left(timestamps, window_start * 1000)
      end_id = bisect_left(timestamps, window_end * 1000)
      if end_id == len(timestamps):
          end_id -= 1
  
      sample_dict = {
          "timestamp": timestamps[start_id:end_id],
          "signal": signal[start_id:end_id],
          "sampling_rate": sampling_rate,
      }
      return sample_dict
  
imports: import csv
  import json
  import logging
  import os
  from bisect import bisect_left
  from collections import defaultdict
  from typing import Any, Callable, Dict, List, Optional, Set, Tuple, Type
  import numpy
  import torch
  import torch.autograd.profiler
  import torch.utils.data
  import torchaudio
  from iopath.common.file_io import g_pathmgr
  from pytorchvideo.data import LabeledVideoDataset
  from pytorchvideo.data.clip_sampling import ClipSampler
  from pytorchvideo.data.ego4d.utils import Ego4dImuDataBase, get_label_id_map, MomentsClipSampler
  from pytorchvideo.data.utils import get_logger
  from pytorchvideo.data.video import VideoPathHandler
  from pytorchvideo.transforms import ApplyTransformToKey, Div255, Normalize, RandomShortSideScale, ShortSideScale
  from torchvision.transforms import CenterCrop, Compose, RandomCrop, RandomHorizontalFlip
label_desc: Use image node_id 5 for calling the Ego4dImuData obj's underlying member method code with example usage: obj._get_imu_window(window_start, window_end, signal, timestamps, sampling_rate) and returns: sample_dict