code: def collect(path: Path):
      if path.is_file():
          try:
              commit = next(iter(REPO.iter_commits(paths=path)))
          except StopIteration:
              return []
  
          html = path.relative_to(HOME)
          if html.suffix not in {".py"}:
              return []
  
          if html.stem == "__init__":
              html = html.parent / "index.html"
          else:
              html = html.parent / f"{html.stem}.html"
  
          return [
              {
                  "path": str(html),
                  "date": str(commit.committed_datetime.date()),
              }
          ]
  
      urls = []
      for f in path.iterdir():
          urls += collect(f)
  
      return urls
  
imports: from pathlib import Path
  import git
label_desc: Use image node_id 1 for calling a global function with example usage: collect(path) and returns: urls, list, list, list