Set an option value.

        Args:
            name (str): The name of the option.
            value: The value to set the option to.

        Raises:
            TypeError: If the value is not a string or appropriate native type.
            ValueError: If the value is a string but cannot be coerced.

        If the name is not registered a new option will be created using the
        option generator.

def set(self, name, value):
        """Set an option value.

        Args:
            name (str): The name of the option.
            value: The value to set the option to.

        Raises:
            TypeError: If the value is not a string or appropriate native type.
            ValueError: If the value is a string but cannot be coerced.

        If the name is not registered a new option will be created using the
        option generator.
        """
        if name not in self._options:

            self.register(name, self._generator())

        return self._options[name].__set__(self, value)