def _append_slash_if_dir_path(self, relpath):
    if self._isdir_raw(relpath):
      return self._append_trailing_slash(relpath)

    return relpath
NOTE: One must keep careful track of aggregate types for this system.
dataset/ETHPy150Open pantsbuild/pants/src/python/pants/base/project_tree.py/ProjectTree._append_slash_if_dir_path--crossover with--dataset/ETHPy150Open RobotLocomotion/director/src/python/urdf_parser_py/xml_reflection/core.py/Object.add_aggregate