def METHOD_NAME(self, sort_by: str = "trials") -> tuple[list[float], list[float]]:
    if len(self.task.objectives) > 1:
        raise NotSupportedError
    assert self._smac is not None
    rh = self._smac.runhistory
    trajectory = self._smac.intensifier.trajectory
    X: list[int | float] = []
    Y: list[float] = []
    for traj in trajectory:
        assert len(traj.config_ids) == 1
        config_id = traj.config_ids[0]
        config = rh.get_config(config_id)
        cost = rh.get_cost(config)
        if cost > 1e6:
            continue
        if sort_by == "trials":
            X.append(traj.trial)
        elif sort_by == "walltime":
            X.append(traj.walltime)
        else:
            raise RuntimeError("Unknown sort_by.")
        Y.append(cost)
    return X, Y