code: def upload_source_code(
      source_files: Optional[List[str]], run: "Run"
  ) -> None:
      entrypoint_filepath = get_path_executed_script()
  
      if (
          not is_ipython()
          and entrypoint_filepath != empty_path
          and os.path.isfile(entrypoint_filepath)
      ):
          if source_files is None:
              entrypoint = os.path.basename(entrypoint_filepath)
              source_files = str(entrypoint_filepath)
          elif not source_files:
              entrypoint = os.path.basename(entrypoint_filepath)
          else:
              common_root = get_common_root(
                  get_absolute_paths(source_files)
              )
              entrypoint_filepath = os.path.abspath(entrypoint_filepath)
  
              if (
                  common_root is not None
                  and does_paths_share_common_drive(
                      [common_root, entrypoint_filepath]
                  )
              ):
                  entrypoint_filepath = normalize_file_name(
                      os.path.relpath(
                          path=entrypoint_filepath, start=common_root
                      )
                  )
  
              entrypoint = normalize_file_name(entrypoint_filepath)
  
          run[
              attr_consts.SOURCE_CODE_ENTRYPOINT_ATTRIBUTE_PATH
          ] = entrypoint
  
      if source_files is not None:
          run[
              attr_consts.SOURCE_CODE_FILES_ATTRIBUTE_PATH
          ].upload_files(source_files)
  
file_path: neptune-client/src/neptune/internal/utils/source_code.py
imports: import os
  from typing import TYPE_CHECKING, List, Optional
  from neptune.attributes import constants
  from neptune.common.storage.storage_utils import normalize_file_name
  from neptune.common.utils import is_ipython
  from neptune.internal.utils import does_paths_share_common_drive, get_absolute_paths, get_common_root
  from neptune.vendor.lib_programname import empty_path, get_path_executed_script
label_desc: Use image node_id 1 for calling a global function with example usage: upload_source_code(source_files, run) without return types