code: def _get_max_version(distribution_files: List[Path]) -> Optional[str]:
      versions = []
      for p in distribution_files:
          version = _get_version_from_file(p)
          # If anything goes wrong, just return None so we upload all files
          # better safe than sorry
          if version:
              try:
                  versions.append(semantic_version.Version(version))
              except ValueError:
                  return None
      return str(max(versions)) if versions else None
  
file_path: gradio/gradio/cli/commands/components/publish.py
imports: import random
  import re
  import shutil
  import tempfile
  from pathlib import Path
  from typing import List, Optional
  import semantic_version
  from huggingface_hub import HfApi
  from rich import print
  from rich.console import Console
  from rich.panel import Panel
  from rich.prompt import Confirm, Prompt
  from tomlkit import parse
  from typer import Argument, Option
  from typing_extensions import Annotated
label_desc: Use image node_id 3 for calling a global function with example usage: _get_max_version(distribution_files) and returns: unknown, None