code: def _check_frames(data, expected_frames_count: Union[list, int]):
      if not isinstance(expected_frames_count, list):
          expected_frames_count = [expected_frames_count]
  
      # to be replaced
      assert data.size() == len(
          expected_frames_count
      ), f"Expected: {len(expected_frames_count)} but got {data.size()} samples in the dataset."
      for idx, sample_dict in enumerate(data):
          sample = sample_dict["video"]
          assert (
              sample.shape[1] == expected_frames_count[idx]
          ), f"Expected video sample {idx} to have {expected_frames_count[idx]} frames but got {sample.shape[1]} frames"
  
file_path: lightning-flash/tests/video/classification/test_data.py
imports: from typing import Union
  import pytest
  import torch
  from flash.core.utilities.imports import _TOPIC_VIDEO_AVAILABLE
  from flash.video.classification.data import VideoClassificationData
label_desc: Use image node_id 4 for calling a global function with example usage: _check_frames(data, expected_frames_count) without return types