import torch


def downsample_target(
    player_future: torch.Tensor,
    num_timesteps_to_keep: int,
) -> torch.Tensor:
  """Downsamples the target sequence."""
  _, T, _ = player_future.shape
  increments = T // num_timesteps_to_keep
  player_future = player_future[:, 0::increments, :]
  return player_future