@pexdoc.pcontracts.new_contract()<EOL>def function(obj):
if (obj is None) or inspect.isfunction(obj):<EOL><INDENT>return None<EOL><DEDENT>raise ValueError(pexdoc.pcontracts.get_exdesc())<EOL>
r"""
    Validate if an object is a function pointer or :code:`None`.

    :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