def __init__(self, docstr, template_order=False):
    '\n        Parameters:\n            docstr (Docstring or str): some existing docstring\n            template_order (bool, optional): iff True, reorder the\n                sections to match the order they appear in the template\n        '
    if isinstance(docstr, Docstring):
        self.sections = docstr.sections
        self.trailing_newlines = docstr.trailing_newlines
        if (not isinstance(docstr, type(self))):
            make_new_sec = self.SECTION_STYLE.from_section
            for (sec_name, sec) in docstr.sections.items():
                if sec:
                    docstr.sections[sec_name] = make_new_sec(sec)
                else:
                    del docstr.sections[sec_name]
            if ('Parameters' in docstr.sections):
                self.get_section('Parameters').heading = self.PREFERRED_PARAMS_ALIAS
                for arg in self.get_section('Parameters').args.values():
                    arg.meta['indent'] = self.get_section('Parameters').indent
            if ('Returns' in docstr.sections):
                for arg in self.get_section('Returns').args.values():
                    arg.meta['indent'] = self.get_section('Returns').indent
            if ('Yields' in docstr.sections):
                for arg in self.get_section('Yields').args.values():
                    arg.meta['indent'] = self.get_section('Yields').indent
    elif isinstance(docstr, string_types):
        if template_order:
            self.sections = self.TEMPLATE.copy()
        else:
            self.sections = OrderedDict()
        self._parse(docstr)
Parameters:
    docstr (Docstring or str): some existing docstring
    template_order (bool, optional): iff True, reorder the
        sections to match the order they appear in the template
def __init__(self, docstr, template_order=False):
    '\n        Parameters:\n            docstr (Docstring or str): some existing docstring\n            template_order (bool, optional): iff True, reorder the\n                sections to match the order they appear in the template\n        '
    if isinstance(docstr, Docstring):
        self.sections = docstr.sections
        self.trailing_newlines = docstr.trailing_newlines
        if (not isinstance(docstr, type(self))):
            make_new_sec = self.SECTION_STYLE.from_section
            for (sec_name, sec) in docstr.sections.items():
                if sec:
                    docstr.sections[sec_name] = make_new_sec(sec)
                else:
                    del docstr.sections[sec_name]
            if ('Parameters' in docstr.sections):
                self.get_section('Parameters').heading = self.PREFERRED_PARAMS_ALIAS
                for arg in self.get_section('Parameters').args.values():
                    arg.meta['indent'] = self.get_section('Parameters').indent
            if ('Returns' in docstr.sections):
                for arg in self.get_section('Returns').args.values():
                    arg.meta['indent'] = self.get_section('Returns').indent
            if ('Yields' in docstr.sections):
                for arg in self.get_section('Yields').args.values():
                    arg.meta['indent'] = self.get_section('Yields').indent
    elif isinstance(docstr, string_types):
        if template_order:
            self.sections = self.TEMPLATE.copy()
        else:
            self.sections = OrderedDict()
        self._parse(docstr)