def METHOD_NAME(self, env_dict):
    """Function to take the environment variable change requested by the
    user and add the appropriate line to the script.
    :param dict env_dict: A dictionary (preferably an OrderedDict) of
        environment keys and values to set. A value of None will unset the
        variable.
    """
    for key, value in env_dict.items():
        if value is not None:
            # Auto quote variables that contain spaces if they aren't already
            # quoted.
            qvalue = str(value).strip()
            if qvalue and qvalue[0] not in ('"', "'") and ' ' in qvalue:
                value = '"{}"'.format(qvalue)
            self._script_lines.append('export {}={}'.format(key, value))
        else:
            self._script_lines.append('unset {}'.format(key))