def METHOD_NAME(self, val):
    r"""Sets the rating scale value.
    Parameters
    ----------
    val : int
        The value.
    """
    if val is not None and (val >= len(self.nodes) or val < 0):
        raise InvalidValue(f'Trying to select a non-existing node ({val}).'
                           f'Did you specify an incorrect default value?')
    self.value = val
    self.set_var(val)