Formats all of the docstrings in the specified element and its
    children into a user-friendly paragraph format for printing.

    :arg element: an instance of fortpy.element.CodeElement.

def format(element):
    """Formats all of the docstrings in the specified element and its
    children into a user-friendly paragraph format for printing.

    :arg element: an instance of fortpy.element.CodeElement.
    """
    result = []
    if type(element).__name__ in ["Subroutine", "Function"]:
        _format_executable(result, element)
    elif type(element).__name__ == "CustomType":
        _format_type(result, element)
    elif isinstance(element, ValueElement):
        _format_value_element(result, element)

    return '\n'.join(result)