def forces_in_dataset(dataset):
    """Check if forces in displacement dataset."""
    if dataset is None:
        return False

    if type(dataset) is not dict:
        raise RuntimeError("dataset is wrongly made.")

    if "first_atoms" in dataset:  # type-1
        for d in dataset["first_atoms"]:
            if "forces" not in d:
                return False
        return True

    if "forces" in dataset:  # type-2
        return True

    return False