def make_docstring_obj(docstr, default='google', template_order=False):
    "Detect docstring style and create a Docstring object\n\n    Parameters:\n        docstr (str): source docstring\n        default (str, class): 'google', 'numpy' or subclass\n            of Docstring\n        template_order (bool, optional): iff True, reorder the\n            sections to match the order they appear in the template\n\n    Returns:\n        subclass of Docstring\n    "
    typ = detect_style(docstr)
    logger.info('[make_docstring_obj] from {} to {}'.format((typ.__name__ if (typ is not None) else None), default.__name__))
    if (typ is None):
        if issubclass(default, Docstring):
            typ = default
        else:
            typ = STYLE_LOOKUP[default.lower()]
    return typ(docstr, template_order=template_order)
Detect docstring style and create a Docstring object

Parameters:
    docstr (str): source docstring
    default (str, class): 'google', 'numpy' or subclass
        of Docstring
    template_order (bool, optional): iff True, reorder the
        sections to match the order they appear in the template

Returns:
    subclass of Docstring
def make_docstring_obj(docstr, default='google', template_order=False):
    "Detect docstring style and create a Docstring object\n\n    Parameters:\n        docstr (str): source docstring\n        default (str, class): 'google', 'numpy' or subclass\n            of Docstring\n        template_order (bool, optional): iff True, reorder the\n            sections to match the order they appear in the template\n\n    Returns:\n        subclass of Docstring\n    "
    typ = detect_style(docstr)
    logger.info('[make_docstring_obj] from {} to {}'.format((typ.__name__ if (typ is not None) else None), default.__name__))
    if (typ is None):
        if issubclass(default, Docstring):
            typ = default
        else:
            typ = STYLE_LOOKUP[default.lower()]
    return typ(docstr, template_order=template_order)