def is_boolean(obj):
    """Test if input object is a boolean.

    > *Input arguments*

    * `obj`: Input variable.

    > *Returns*

    `True`, if `obj` is a boolean.
    """
    return isinstance(obj, bool) or obj in [0, 1]
