code: def test_get_item_filesizes(tmp_path):
      _generate_file_with_size(tmp_path / "file1", 32)
      _generate_file_with_size(tmp_path / "file2", 64)
      _generate_file_with_size(tmp_path / "file3", 128)
      _generate_file_with_size(tmp_path / "file4", 256)
  
      items = [
          # not a path
          "not a path",
          # single file path
          str(tmp_path / "file1"),
          # tuple: one file path
          (1, 2, str(tmp_path / "file2")),
          # list: two file paths
          [str(tmp_path / "file2"), None, str(tmp_path / "file3")],
          # list: one file path exists, one does not
          [
              str(tmp_path / "other" / "other"),
              None,
              str(tmp_path / "file4"),
          ],
          # dict: with file path
          {"file": str(tmp_path / "file4"), "data": "not file"},
      ]
      num_bytes = _get_item_filesizes(items, base_path=str(tmp_path))
      assert num_bytes == [0, 32, 64, 64 + 128, 256, 256]
  
      with open(tmp_path / "empty_file", "w"):
          pass
      assert os.path.getsize(tmp_path / "empty_file") == 0
      with pytest.raises(RuntimeError, match="has 0 bytes!"):
          _get_item_filesizes([str(tmp_path / "empty_file")])
  
imports: import os
  import random
  import sys
  from typing import Any, List
  from unittest import mock
  import lightning_cloud
  import numpy
  import pytest
  import torch
  from lightning import seed_everything
  from lightning.data.streaming import data_processor
  from lightning.data.streaming import functions
  from lightning.data.streaming.cache import Cache, Dir
  from lightning.data.streaming.data_processor import DataChunkRecipe, DataProcessor, DataTransformRecipe, _download_data_target, _get_item_filesizes, _map_items_to_workers_sequentially, _map_items_to_workers_weighted, _remove_target, _upload_fn, _wait_for_disk_usage_higher_than_threshold, _wait_for_file_to_exist
  from lightning.data.streaming.functions import LambdaDataTransformRecipe, map, optimize
  from lightning_cloud import resolver
  from lightning_utilities.core.imports import RequirementCache
label_desc: Use image node_id 23 for calling a global function with example usage: test_get_item_filesizes(tmp_path) without return types