def create_docstring_parser(style: DocstringStyle) -> AbstractDocstringParser:
if style == DocstringStyle.EPYDOC:
return EpydocParser()
if style == DocstringStyle.GOOGLE:
return GoogleDocParser()
if style == DocstringStyle.NUMPY:
return NumpyDocParser()
if style == DocstringStyle.REST:
return RestDocParser()
else:
return PlaintextDocstringParser()