code: def get_dir_name(cwd=None) -> str:
      github_repository = execute_git_command(
          ["config", "--get", "remote.origin.url"], cwd=cwd
      )
      if github_repository and "github.com" in github_repository:
          return github_repository.split("/")[-1].split(".")[0]
      raise RuntimeError("Only work with github repositories.")
  
file_path: pytorch-lightning/src/lightning/app/utilities/git.py
imports: import subprocess
  from pathlib import Path
  from typing import List, Union
label_desc: Use image node_id 2 for calling a global function with example usage: get_dir_name(cwd) and returns: github_repository