def METHOD_NAME(self, location_name: str) -> CodeLocation:
    if self._location_entries is None:
        self._location_entries = self._load_workspace()
    if location_name not in self._location_entries:
        raise DagsterCodeLocationLoadError(
            f"Location {location_name} does not exist in workspace",
            load_error_infos=[],
        )
    location_entry = self._location_entries[location_name]
    if location_entry.load_error:
        raise DagsterCodeLocationLoadError(
            f"Failure loading {location_name}: {location_entry.load_error}",
            load_error_infos=[location_entry.load_error],
        )
    if not location_entry.code_location:
        raise DagsterCodeLocationLoadError(
            f"Location {location_name} is still loading",
            load_error_infos=[],
        )
    return location_entry.code_location