The @option(x) decorator, usable in an immutable class (see immutable), is identical to the
    @param decorator except that the parameter is not required and instead takes on the default
    value x when the immutable is created.

def option(default_value):
    '''
    The @option(x) decorator, usable in an immutable class (see immutable), is identical to the
    @param decorator except that the parameter is not required and instead takes on the default
    value x when the immutable is created.
    '''
    def _option(f):
        (args, varargs, kwargs, dflts) = getargspec_py27like(f)
        if varargs is not None or kwargs is not None or dflts:
            raise ValueError(
                'Options may not accept variable, variadic keyword, or default arguments')
        if len(args) != 1:
            raise ValueError('Parameter transformation functions must take exactly one argument')
        f._pimms_immutable_data_ = {}
        f._pimms_immutable_data_['is_param'] = True
        f._pimms_immutable_data_['default_value'] = default_value
        f._pimms_immutable_data_['name'] = f.__name__
        f = staticmethod(f)
        return f
    return _option