def METHOD_NAME(
    self,
    finder: PackageFinder,
    build_isolation: bool,
    check_build_deps: bool,
) -> None:
    # Load pyproject.toml, to determine whether PEP 517 is to be used
    self.req.load_pyproject_toml()
    # Set up the build isolation, if this requirement should be isolated
    should_isolate = self.req.use_pep517 and build_isolation
    if should_isolate:
        # Setup an isolated environment and install the build backend static
        # requirements in it.
        self._prepare_build_backend(finder)
        # Check that if the requirement is editable, it either supports PEP 660 or
        # has a setup.py or a setup.cfg. This cannot be done earlier because we need
        # to setup the build backend to verify it supports build_editable, nor can
        # it be done later, because we want to avoid installing build requirements
        # needlessly. Doing it here also works around setuptools generating
        # UNKNOWN.egg-info when running get_requires_for_build_wheel on a directory
        # without setup.py nor setup.cfg.
        self.req.isolated_editable_sanity_check()
        # Install the dynamic build requirements.
        self._install_build_reqs(finder)
    # Check if the current environment provides build dependencies
    should_check_deps = self.req.use_pep517 and check_build_deps
    if should_check_deps:
        pyproject_requires = self.req.pyproject_requires
        assert pyproject_requires is not None
        conflicting, missing = self.req.build_env.check_requirements(
            pyproject_requires
        )
        if conflicting:
            self._raise_conflicts("the backend dependencies", conflicting)
        if missing:
            self._raise_missing_reqs(missing)
    self.req.prepare_metadata()