def get_serializer(method='xml', **kwargs):
    'Return a serializer object for the given method.\n    \n    :param method: the serialization method; can be either "xml", "xhtml",\n                   "html", "text", or a custom serializer class\n\n    Any additional keyword arguments are passed to the serializer, and thus\n    depend on the `method` parameter value.\n    \n    :see: `XMLSerializer`, `XHTMLSerializer`, `HTMLSerializer`, `TextSerializer`\n    :since: version 0.4.1\n    '
    if isinstance(method, basestring):
        method = {'xml': XMLSerializer, 'xhtml': XHTMLSerializer, 'html': HTMLSerializer, 'text': TextSerializer}[method.lower()]
    return method(**kwargs)
Return a serializer object for the given method.

:param method: the serialization method; can be either "xml", "xhtml",
               "html", "text", or a custom serializer class

Any additional keyword arguments are passed to the serializer, and thus
depend on the `method` parameter value.

:see: `XMLSerializer`, `XHTMLSerializer`, `HTMLSerializer`, `TextSerializer`
:since: version 0.4.1
def get_serializer(method='xml', **kwargs):
    'Return a serializer object for the given method.\n    \n    :param method: the serialization method; can be either "xml", "xhtml",\n                   "html", "text", or a custom serializer class\n\n    Any additional keyword arguments are passed to the serializer, and thus\n    depend on the `method` parameter value.\n    \n    :see: `XMLSerializer`, `XHTMLSerializer`, `HTMLSerializer`, `TextSerializer`\n    :since: version 0.4.1\n    '
    if isinstance(method, basestring):
        method = {'xml': XMLSerializer, 'xhtml': XHTMLSerializer, 'html': HTMLSerializer, 'text': TextSerializer}[method.lower()]
    return method(**kwargs)