class_docstr: abstract class for task with retrival.
class_docstr_tok: ["abstract","class","for","task","with","retrival","."]
code: def reshape_subsample(self, sample):
      for key in sample:
          if torch.is_tensor(sample[key]):
              sample[key] = self.flat_subsample(sample[key])
      return sample
  
imports: import os
  import torch
  import pickle
  import random
  from tqdm import tqdm
  from torch.utils.data import DataLoader
  from torch.utils.data.distributed import DistributedSampler
  from ..processors import ShardedHow2MetaProcessor, ShardedVideoProcessor, ShardedTextProcessor, VariedLenAligner
  from ..datasets import MMDataset
  from .task import Task
  from ..modules import vectorpool
  from ..evaluators.predictor import Predictor
  from ..utils import set_seed, get_local_rank, get_world_size
label_desc: Use image node_id 1 for calling the RetriTask obj's underlying member method code with example usage: obj.reshape_subsample(sample) and returns: sample