code: def match_runs(
      repo: "Repo", hashes: List[str], lookup_dir: str = None
  ) -> List[str]:
      matched_hashes = set()
      all_run_hashes = None
      for run_hash in hashes:
          if "*" in run_hash:
              expr = run_hash  # for the sake of readability
              # avoiding multiple or unnecessary list_runs() calls
              if not all_run_hashes:
                  all_run_hashes = repo.list_all_runs()
              if expr == "*":
                  return all_run_hashes
              # update the matches set with current expression matches
              matched_hashes.update(
                  fnmatch.filter(all_run_hashes, expr)
              )
          else:
              matched_hashes.add(run_hash)
  
      return list(matched_hashes)
  
file_path: aim/aim/cli/runs/utils.py
imports: import fnmatch
  import os
  from typing import List, Tuple, TYPE_CHECKING
  import io
  import zipfile
  from datetime import datetime
label_desc: Use image node_id 1 for calling a global function with example usage: match_runs(repo, hashes, lookup_dir) and returns: list, all_run_hashes