code: def test_check_dataset_file_median_size(spark_test_ctx, caplog):
      file_size_map = {
          "/a/b/01.parquet": 30,
          "/a/b/02.parquet": 40,
          "/a/b/03.parquet": 50,
          "/a/b/04.parquet": 60,
          "/a/b/05.parquet": 999000,
      }
      with mock.patch("os.path.getsize") as mock_path_get_size:
          mock_path_get_size.side_effect = lambda p: file_size_map[p]
          url_list = ["file://" + path for path in file_size_map.keys()]
          caplog.clear()
          _check_dataset_file_median_size(url_list)
          assert "The median size" in " ".join(caplog.messages)
  
          for k in file_size_map:
              file_size_map[k] *= 1024 * 1024
          caplog.clear()
          _check_dataset_file_median_size(url_list)
          assert "The median size" not in " ".join(caplog.messages)
  
          file_size_map = {"/a/b/01.parquet": 29}
          url_list = ["file:///a/b/01.parquet"]
          caplog.clear()
          _check_dataset_file_median_size(url_list)
          assert "The median size" not in " ".join(caplog.messages)
  
imports: import os
  import subprocess
  import sys
  import tempfile
  import threading
  import time
  from distutils.version import LooseVersion
  import numpy
  import pyspark
  import pytest
  import py4j
  import tensorflow.compat.v1
  from pyspark.sql.functions import pandas_udf
  from pyspark.sql.types import ArrayType, BinaryType, BooleanType, ByteType, DoubleType, FloatType, IntegerType, LongType, ShortType, StringType, StructField, StructType
  from six.moves.urllib.parse import urlparse
  from petastorm import make_batch_reader
  from petastorm.fs_utils import FilesystemResolver
  from petastorm.spark import SparkDatasetConverter, make_spark_converter, spark_dataset_converter
  from petastorm.spark.spark_dataset_converter import _check_dataset_file_median_size, _check_parent_cache_dir_url, _check_rank_and_size_consistent_with_horovod, _check_url, _get_horovod_rank_and_size, _get_spark_session, _make_sub_dir_url, register_delete_dir_handler, _wait_file_available, _normalize_databricks_dbfs_url
  from unittest import mock
  from petastorm.tests.test_tf_utils import create_tf_graph
label_desc: Use image node_id 27 for calling a global function with example usage: test_check_dataset_file_median_size(spark_test_ctx, caplog) without return types