code: def data_back_to_input_form(data, labels, data_valid, data_idx):
      """
      "De"-collates data back into their form when originally passed.
      """
      assert len(data) == len(labels)
      assert len(data_idx) == len(data_valid)
      data_input_form = []
      num_duplicates, num_images = len(data), len(data[0])
      for sample_i in range(num_images):
          sample_input_form = {
              "data": [],
              "data_valid": [],
              "data_idx": [],
              "label": [],
          }
          for duplicate_i in range(num_duplicates):
              valid_and_idx_i = sample_i + (
                  num_duplicates * duplicate_i
              )
              sample_input_form["data"].append(
                  data[duplicate_i][sample_i]
              )
              sample_input_form["label"].append(
                  labels[duplicate_i][sample_i].tolist()
              )
              sample_input_form["data_idx"].append(
                  data_idx[valid_and_idx_i].item()
              )
              sample_input_form["data_valid"].append(
                  data_valid[valid_and_idx_i].item()
              )
          data_input_form.append(sample_input_form)
      return data_input_form
  
imports: import collections.abc
  from typing import Any, Dict, Optional
  import numpy
  import torch
  from classy_vision.generic.util import convert_to_one_hot
  from torch.distributions.beta import Beta
  from vissl.data.collators import register_collator
  from .moco_collator import moco_collator
  from .simclr_collator import simclr_collator
label_desc: Use image node_id 2 for calling a global function with example usage: data_back_to_input_form(data, labels, data_valid, data_idx) and returns: data_input_form