code: def get_segments(
      x: torch.Tensor,
      start_idxs: torch.Tensor,
      segment_size: int,
  ) -> torch.Tensor:
      """Get segments.
  
      Args:
          x (Tensor): Input tensor (B, C, T).
          start_idxs (Tensor): Start index tensor (B,).
          segment_size (int): Segment size.
  
      Returns:
          Tensor: Segmented tensor (B, C, segment_size).
  
      """
      b, c, t = x.size()
      segments = x.new_zeros(b, c, segment_size)
      for i, start_idx in enumerate(start_idxs):
          segments[i] = x[i, :, start_idx : start_idx + segment_size]
      return segments
  
label_desc: Use image node_id 2 for calling a global function with example usage: get_segments(x, start_idxs, segment_size) and returns: segments