'Construct the XML for this widget
@param agent_id: the agent ID (same as the DOM node ID of the
outer wrapper DIV, to attach scripts)
@param config: the active widget configuration
@param version: the config version key
@param context: the S3DashboardContext
@return: an XmlComponent with the widget contents,
the outer DIV will be added by the agent'

def widget(self, agent_id, config, version=None, context=None):

    contents = config.get('xml', '')
    self.inject_script(agent_id, version=version)
    return XML(contents)
