<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_pyproject(path):
 # type: (Union[STRING_TYPE, Path]) -> Optional[Tuple[List[STRING_TYPE], STRING_TYPE]] """ Given a base path, look for the corresponding ``pyproject.toml`` file and return its build_requires and build_backend. :param AnyStr path: The root path of the project, should be a directory (will be truncated) :return: A 2 tuple of build requirements and the build backend :rtype: Optional[Tuple[List[AnyStr], AnyStr]] """


    if not path:
        return
    from vistir.compat import Path

    if not isinstance(path, Path):
        path = Path(path)
    if not path.is_dir():
        path = path.parent
    pp_toml = path.joinpath("pyproject.toml")
    setup_py = path.joinpath("setup.py")
    if not pp_toml.exists():
        if not setup_py.exists():
            return None
        requires = ["setuptools>=40.8", "wheel"]
        backend = get_default_pyproject_backend()
    else:
        pyproject_data = {}
        with io.open(pp_toml.as_posix(), encoding="utf-8") as fh:
            pyproject_data = tomlkit.loads(fh.read())
        build_system = pyproject_data.get("build-system", None)
        if build_system is None:
            if setup_py.exists():
                requires = ["setuptools>=40.8", "wheel"]
                backend = get_default_pyproject_backend()
            else:
                requires = ["setuptools>=40.8", "wheel"]
                backend = get_default_pyproject_backend()
            build_system = {"requires": requires, "build-backend": backend}
            pyproject_data["build_system"] = build_system
        else:
            requires = build_system.get("requires", ["setuptools>=40.8", "wheel"])
            backend = build_system.get("build-backend", get_default_pyproject_backend())
    return requires, backend