def describe_valid_values(definition):
    """Build a sentence describing valid values for an object from its definition.

    This only covers booleans, enums, integers, and numbers.
    Currently uncovered are anyOfs, arrays, and objects.

    Parameters
    ----------
    definition : :obj:`dict`
        An object definition, following the BIDS schema object rules.

    Returns
    -------
    :obj:`str`
        A sentence describing valid values for the object.
    """
    description = ""
    if "anyOf" in definition.keys():
        return description

    if definition["type"] == "boolean":
        description = 'Must be one of: `"true"`, `"false"`.'

    elif definition["type"] == "string":
        if "enum" in definition.keys():
            # Allow enums to be "objects" (dicts) or strings
            enum_values = [
                list(v.keys())[0] if isinstance(v, dict) else v for v in definition["enum"]
            ]
            enum_values = [f'`"{v}"`' for v in enum_values]
            description = f"Must be one of: {', '.join(enum_values)}."

    elif definition["type"] in ("integer", "number"):
        if "minimum" in definition.keys():
            minstr = f"greater than or equal to {definition['minimum']}"
        elif "exclusiveMinimum" in definition.keys():
            minstr = f"greater than {definition['exclusiveMinimum']}"
        else:
            minstr = ""

        if "maximum" in definition.keys():
            maxstr = f"less than or equal to {definition['maximum']}"
        elif "exclusiveMaximum" in definition.keys():
            maxstr = f"less than {definition['exclusiveMaximum']}"
        else:
            maxstr = ""

        if minstr and maxstr:
            minmaxstr = f"{minstr} and {maxstr}"
        elif minstr:
            minmaxstr = minstr
        elif maxstr:
            minmaxstr = maxstr
        else:
            minmaxstr = ""

        if minmaxstr:
            description = f"Must be a number {minmaxstr}."
        else:
            description = ""

    return description