def main(text=None):
    try:
        src = sys.stdin.read() if text is None else text
        import textwrap

        rest_formatter.main(str(NumpyDocstring(textwrap.dedent(src))))
    except:
        exc_type, exc_value, exc_traceback = sys.exc_info()
        sys.stderr.write("Error calculating docstring: " + str(exc_value))
def main(text=None):
    src = sys.stdin.read() if text is None else text
    rest_formatter.main(str(GoogleDocstring(textwrap.dedent(src))))