code: def test_DataFilesPatternsList(text_file):
      data_files_patterns = DataFilesPatternsList(
          [str(text_file)], allowed_extensions=[None]
      )
      data_files = data_files_patterns.resolve(base_path="")
      assert data_files == [text_file.as_posix()]
      assert isinstance(data_files, DataFilesList)
      data_files_patterns = DataFilesPatternsList(
          [str(text_file)], allowed_extensions=[[".txt"]]
      )
      data_files = data_files_patterns.resolve(base_path="")
      assert data_files == [text_file.as_posix()]
      assert isinstance(data_files, DataFilesList)
      data_files_patterns = DataFilesPatternsList(
          [str(text_file).replace(".txt", ".tx*")],
          allowed_extensions=[None],
      )
      data_files = data_files_patterns.resolve(base_path="")
      assert data_files == [text_file.as_posix()]
      assert isinstance(data_files, DataFilesList)
      data_files_patterns = DataFilesPatternsList(
          [Path(text_file).name], allowed_extensions=[None]
      )
      data_files = data_files_patterns.resolve(
          base_path=str(Path(text_file).parent)
      )
      assert data_files == [text_file.as_posix()]
      data_files_patterns = DataFilesPatternsList(
          [str(text_file)], allowed_extensions=[[".zip"]]
      )
      with pytest.raises(FileNotFoundError):
          data_files_patterns.resolve(base_path="")
  
imports: import copy
  import os
  from pathlib import Path
  from typing import List
  from unittest.mock import patch
  import fsspec
  import pytest
  from fsspec.registry import _registry
  from fsspec.spec import AbstractFileSystem
  from datasets.data_files import DataFilesDict, DataFilesList, DataFilesPatternsDict, DataFilesPatternsList, _get_data_files_patterns, _get_metadata_files_patterns, _is_inside_unrequested_special_dir, _is_unrequested_hidden_file_or_is_inside_unrequested_hidden_dir, get_data_patterns, resolve_pattern
  from datasets.fingerprint import Hasher
label_desc: Use image node_id 41 for calling a global function with example usage: test_DataFilesPatternsList(text_file) without return types