code: def __is_outside_of_builddir(project, path_to_check):
      
      bdir = project.builddir
      cprefix = os.path.commonprefix([path_to_check, bdir])
      return cprefix != bdir
docs: Check if a project lies outside of its expected directory.