code: def retrieve_commit_dates(filepath):
      current_dir = os.getcwd()
      parent = str(filepath.parent)
      os.chdir(parent)
      result = execute_command(
          [
              "git",
              "log",
              '--format="%ci,%s"',
              "--reverse",
              filepath.name,
          ]
      )
      os.chdir(current_dir)
      excluded = ""
      for line in result.split("\n"):
          if _exclude_regex.search(line):
              continue
          else:
              excluded += line
      dates = _date_extract_regex.findall(excluded)
      return dates
  
imports: import argparse
  import os
  import pathlib
  import re
  import subprocess
  from tqdm import tqdm
  from contextlib import contextmanager
label_desc: Use image node_id 2 for calling a global function with example usage: retrieve_commit_dates(filepath) and returns: dates