code: def track_uncommitted_changes(
      git_ref: Union[GitRef, GitRefDisabled], run: "Run"
  ) -> None:
      repo = get_repo_from_git_ref(git_ref)
  
      if not repo:
          return
  
      uncommitted_changes = get_uncommitted_changes(repo)
  
      if not uncommitted_changes:
          return
  
      if uncommitted_changes.diff_head:
          run[DIFF_HEAD_INDEX_PATH].upload(
              File.from_content(
                  uncommitted_changes.diff_head, extension="patch"
              )
          )
  
      if uncommitted_changes.diff_upstream:
          run[
              f"{UPSTREAM_INDEX_DIFF}{uncommitted_changes.upstream_sha}"
          ].upload(
              File.from_content(
                  uncommitted_changes.diff_upstream, extension="patch"
              )
          )
  
file_path: neptune-client/src/neptune/internal/utils/git.py
imports: import logging
  import warnings
  from dataclasses import dataclass
  from datetime import datetime
  from typing import TYPE_CHECKING, List, Optional, Union
  from neptune.attributes.constants import DIFF_HEAD_INDEX_PATH, UPSTREAM_INDEX_DIFF
  from neptune.types import File
  from neptune.types.atoms.git_ref import GitRef, GitRefDisabled
label_desc: Use image node_id 9 for calling a global function with example usage: track_uncommitted_changes(git_ref, run) without return types