code: def _validate_sparse_to_contiguous_preproc(
      self,
      unprocessed_data: List[np.ndarray],
      expected_data: List[np.ndarray],
      freq_threshold: int,
      columns: int,
  ) -> None:
      # Save the unprocessed data to temporary directory.
      temp_input_dir: str
      temp_output_dir: str
      with tempfile.TemporaryDirectory() as temp_input_dir, tempfile.TemporaryDirectory() as temp_output_dir:
          input_files = []
          for i, data in enumerate(unprocessed_data):
              file = os.path.join(temp_input_dir, f"day_{i}_sparse.npy")
              input_files.append(file)
              np.save(file, data)
  
          BinaryCriteoUtils.sparse_to_contiguous(
              input_files, temp_output_dir, freq_threshold, columns
          )
  
          output_files = [
              os.path.join(temp_output_dir, f)
              for f in os.listdir(temp_output_dir)
          ]
          output_files.sort()
          for day, file in enumerate(output_files):
              processed_data = np.load(file)
              self.assertTrue(
                  np.array_equal(expected_data[day], processed_data)
              )
  
imports: import contextlib
  import math
  import os
  import random
  import tempfile
  from typing import Any, Dict, List, Optional
  import numpy
  from torch.utils.data import DataLoader
  from torchrec.datasets.criteo import BinaryCriteoUtils, CAT_FEATURE_COUNT, criteo_kaggle, criteo_terabyte, InMemoryBinaryCriteoIterDataPipe, INT_FEATURE_COUNT
  from torchrec.datasets.test_utils.criteo_test_utils import CriteoTest
  from torchrec.datasets.utils import Batch
label_desc: Use image node_id 6 for calling the TestBinaryCriteoUtils obj's underlying member method code with example usage: obj._validate_sparse_to_contiguous_preproc(unprocessed_data, expected_data, freq_threshold, columns) without return types