def generate_legacy_webfinger(template=None, *args, **kwargs):
if template == "<STR_LIT>":<EOL><INDENT>webfinger = DiasporaWebFinger(*args, **kwargs)<EOL><DEDENT>else:<EOL><INDENT>webfinger = BaseLegacyWebFinger(*args, **kwargs)<EOL><DEDENT>return webfinger.render()<EOL>
Generate a legacy webfinger XRD document.

    Template specific key-value pairs need to be passed as ``kwargs``, see classes.

    :arg template: Ready template to fill with args, for example "diaspora" (optional)
    :returns: Rendered XRD document (str)