code: def file_counts_by_category(self) -> FileCountsByCategory:
      artifact_files = 0
      wandb_files = 0
      media_files = 0
      other_files = 0
      # Need to use list to ensure we get a copy, since other threads may
      # modify this while we iterate
      with self._lock:
          file_stats = list(self._stats.items())
      for save_name, stats in file_stats:
          if stats.artifact_file:
              artifact_files += 1
          elif wandb.wandb_lib.filenames.is_wandb_file(save_name):  # type: ignore[attr-defined]  # TODO(spencerpearson): this is probably synonymous with wandb.sdk.lib.filenames...?
              wandb_files += 1
          elif save_name.startswith("media"):
              media_files += 1
          else:
              other_files += 1
      return FileCountsByCategory(
          artifact=artifact_files,
          wandb=wandb_files,
          media=media_files,
          other=other_files,
      )
  
file_path: wandb/wandb/filesync/stats.py
imports: import threading
  from typing import MutableMapping, NamedTuple
  import wandb
label_desc: Use image node_id 7 for calling the Stats obj's underlying member method code with example usage: obj.file_counts_by_category() and returns: FileCountsByCategory