@pexdoc.pcontracts.new_contract()<EOL>def offset_range(obj):
if (<EOL>isinstance(obj, (int, float))<EOL>and (not isinstance(obj, bool))<EOL>and (<NUM_LIT:0> <= obj <= <NUM_LIT:1>)<EOL>):<EOL><INDENT>return None<EOL><DEDENT>raise ValueError(pexdoc.pcontracts.get_exdesc())<EOL>
r"""
    Validate if an object is a number in the [0, 1] range.

    :param obj: Object
    :type  obj: any

    :raises: RuntimeError (Argument \`*[argument_name]*\` is not valid). The
     token \*[argument_name]\* is replaced by the name of the argument the
     contract is attached to

    :rtype: None