def METHOD_NAME(
    self, archive: Path, output_dir: Path | None = None, *, editable: bool = False
) -> Path:
    if not self._should_prepare(archive):
        return archive
    if archive.is_dir():
        destination = output_dir or Path(tempfile.mkdtemp(prefix="poetry-chef-"))
        return self._prepare(archive, destination=destination, editable=editable)
    return self._prepare_sdist(archive, destination=output_dir)