code: def in_directory(filepath, dirpath):
      
      filepath = os.path.realpath(filepath)
      dirpath = os.path.realpath(dirpath)
      return filepath == dirpath or filepath.startswith(os.path.join(dirpath, ""))
docs: Returns a boolean for whether filepath is contained in dirpath.
  
      Normalizes the paths (e.g. resolving symlinks and ..)
      so this is the safe way to make sure a user-configured path
      is located inside the user's project repo.