def setvar(cls, name, value):
    "Set the value of a variable.\n\n        :param name: The name of the variable.\n        :param value: The value of the variable.\n\n        :returns: :class:`True` if the variable was set.\n            A variable will *not* be set, if it does not exist or when an\n            attempt is made to set it with its underlying descriptor.\n            This happens during the variable injection time and it should be\n            delegated to the class' :func:`__setattr__` method.\n\n        :raises ReframeSyntaxError: If an attempt is made to override a\n            variable with a descriptor other than its underlying one.\n\n        "
    try:
        var_space = super().__getattribute__('_rfm_var_space')
        if (name in var_space):
            if (not hasattr(value, '__get__')):
                var_space[name].define(value)
                return True
            elif (var_space[name].field is not value):
                desc = '.'.join([cls.__qualname__, name])
                raise ReframeSyntaxError(f'cannot override variable descriptor {desc!r}')
            else:
                return False
    except AttributeError:
        'Catch early access attempt to the variable space.'
        return False
Set the value of a variable.

:param name: The name of the variable.
:param value: The value of the variable.

:returns: :class:`True` if the variable was set.
    A variable will *not* be set, if it does not exist or when an
    attempt is made to set it with its underlying descriptor.
    This happens during the variable injection time and it should be
    delegated to the class' :func:`__setattr__` method.

:raises ReframeSyntaxError: If an attempt is made to override a
    variable with a descriptor other than its underlying one.
def setvar(cls, name, value):
    "Set the value of a variable.\n\n        :param name: The name of the variable.\n        :param value: The value of the variable.\n\n        :returns: :class:`True` if the variable was set.\n            A variable will *not* be set, if it does not exist or when an\n            attempt is made to set it with its underlying descriptor.\n            This happens during the variable injection time and it should be\n            delegated to the class' :func:`__setattr__` method.\n\n        :raises ReframeSyntaxError: If an attempt is made to override a\n            variable with a descriptor other than its underlying one.\n\n        "
    try:
        var_space = super().__getattribute__('_rfm_var_space')
        if (name in var_space):
            if (not hasattr(value, '__get__')):
                var_space[name].define(value)
                return True
            elif (var_space[name].field is not value):
                desc = '.'.join([cls.__qualname__, name])
                raise ReframeSyntaxError(f'cannot override variable descriptor {desc!r}')
            else:
                return False
    except AttributeError:
        'Catch early access attempt to the variable space.'
        return False