code: def test_filter_valid_files_no_invalid(tmpdir):
      valid_extensions = _make_valid_extensions()
      valid_extensions = list(valid_extensions)
      mock_files = _make_fake_files(valid_extensions, seed=42)
      mockdir = _make_mock_dir(tmpdir, mock_files)
      with warnings.catch_warnings():
          warnings.simplefilter("error")
          filtered = filter_valid_files(
              mockdir, valid_extensions=valid_extensions
          )
      assert len(filtered) == len(mockdir)
  
file_path: lightning-flash/tests/core/data/utilities/test_paths.py
imports: import os
  import warnings
  from string import ascii_lowercase
  from typing import List
  import pytest
  from flash.core.data.utilities.loading import AUDIO_EXTENSIONS, IMG_EXTENSIONS, NP_EXTENSIONS
  from flash.core.data.utilities.paths import PATH_TYPE, filter_valid_files
  from numpy import random
label_desc: Use image node_id 6 for calling a global function with example usage: test_filter_valid_files_no_invalid(tmpdir) without return types