code: def test_resolve_pattern_in_dataset_repository(
      hub_dataset_repo_path, pattern, hub_dataset_repo_patterns_results
  ):
      try:
          resolved_data_files = resolve_pattern(
              pattern, hub_dataset_repo_path
          )
          assert (
              sorted(str(f) for f in resolved_data_files)
              == hub_dataset_repo_patterns_results[pattern]
          )
      except FileNotFoundError:
          assert len(hub_dataset_repo_patterns_results[pattern]) == 0
  
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 22 for calling a global function with example usage: test_resolve_pattern_in_dataset_repository(hub_dataset_repo_path, pattern, hub_dataset_repo_patterns_results) without return types