def METHOD_NAME():
    if 'spiceoptions' in os.environ:
        try:
            spiceConfig = ast.literal_eval(os.environ['spiceoptions'])
            spiceConfig = dict((k.lower(), v)
                               for k, v in spiceConfig.iteritems())
            domxml = hooking.read_domxml()
            for graphDev in domxml.getElementsByTagName('graphics'):
                if graphDev.getAttribute('type') == 'spice':
                    for elmt, value in spiceConfig.items():
                        if elmt not in spiceOpts:
                            sys.stderr.write(" Invalid ELEMENT"
                                             " [%s] " % elmt)
                        else:
                            for attr, attrValue in value.items():
                                if attr not in spiceOpts[elmt]:
                                    sys.stderr.write(" Invalid ATTRIBUTE"
                                                     " [%s]" % attr)
                                elif attrValue not in spiceOpts[elmt][attr]:
                                    sys.stderr.write(" Invalid VALUE"
                                                     " [%s]" % attrValue)
                                else:
                                    returnElmt = createElement(domxml,
                                                               elmt,
                                                               attr,
                                                               attrValue)
                                    if returnElmt:
                                        graphDev.appendChild(returnElmt)
            hooking.write_domxml(domxml)
        except:
            hooking.exit_hook('spiceoptions: [unexpected error]: %s\n'
                              % traceback.format_exc())
            sys.exit(2)