code: def is_child(path: Path, parent: Path) -> bool:
      assert path.is_absolute()
      assert parent.is_absolute()
      cur_path = path
      while cur_path != parent and cur_path != root:
          cur_path = cur_path.parent
          if cur_path == parent:
              return True
      return False
  
file_path: determined/pre-commit/check.py
imports: import argparse
  import concurrent.futures
  import multiprocessing
  import os
  import subprocess
  import sys
  from pathlib import Path
  from typing import Dict, Iterable, List, Set, Tuple, Union
label_desc: Use image node_id 2 for calling a global function with example usage: is_child(path, parent) and returns: False, True