<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_with_conversion(self, variable, value_string):
 """Convert user supplied string to Python type. Lets user use values such as True, False and integers. All variables can be set to None, regardless of type. Handle the case where a string is typed by the user and is not quoted, as a string literal. """

        self._assert_valid_variable(variable)
        try:
            v = ast.literal_eval(value_string)
        except (ValueError, SyntaxError):
            v = value_string
        if v is None or v == "none":
            self._variables[variable] = None
        else:
            try:
                type_converter = variable_type_map[variable]
                value_string = self._validate_variable_type(
                    value_string, type_converter
                )
                value = type_converter(value_string)
                self._variables[variable] = value
            except ValueError:
                raise d1_cli.impl.exceptions.InvalidArguments(
                    "Invalid value for {}: {}".format(variable, value_string)
                )