code: def get_modified_python_files(diff_with_last_commit=False):
      """
      Return a list of python files that have been modified between:
  
      - the current head and the main branch if `diff_with_last_commit=False` (default)
      - the current head and its parent commit otherwise.
      """
      repo = Repo(PATH_TO_TRANFORMERS)
  
      if not diff_with_last_commit:
          print(f"main is at {repo.refs.main.commit}")
          print(f"Current head is at {repo.head.commit}")
  
          branching_commits = repo.merge_base(repo.refs.main, repo.head)
          for commit in branching_commits:
              print(f"Branching commit: {commit}")
          return get_diff(repo, repo.head.commit, branching_commits)
      else:
          print(f"main is at {repo.head.commit}")
          parent_commits = repo.head.commit.parents
          for commit in parent_commits:
              print(f"Parent commit: {commit}")
          return get_diff(repo, repo.head.commit, parent_commits)
  
imports: import argparse
  import collections
  import json
  import os
  import re
  from contextlib import contextmanager
  from pathlib import Path
  from git import Repo
label_desc: Use image node_id 5 for calling a global function with example usage: get_modified_python_files(diff_with_last_commit) and returns: get_diff, get_diff