def validate_one(func_name):
    '\n    Validate the docstring for the given func_name\n\n    Parameters\n    ----------\n    func_name : function\n        Function whose docstring will be evaluated\n\n    Returns\n    -------\n    int\n        The number of errors found in the `func_name` docstring\n    '
    func_obj = _load_obj(func_name)
    doc = Docstring(func_name, func_obj)
    sys.stderr.write(_output_header('Docstring ({})'.format(func_name)))
    sys.stderr.write('{}\n'.format(doc.clean_doc))
    errs = []
    wrns = []
    if (doc.start_blank_lines != 1):
        errs.append('Docstring text (summary) should start in the line immediately after the opening quotes (not in the same line, or leaving a blank line in between)')
    if (doc.end_blank_lines != 1):
        errs.append('Closing quotes should be placed in the line after the last text in the docstring (do not close the quotes in the same line as the text, or leave a blank line between the last text and the quotes)')
    if doc.double_blank_lines:
        errs.append('Use only one blank line to separate sections or paragraphs')
    if (not doc.summary):
        errs.append('No summary found (a short summary in a single line should be present at the beginning of the docstring)')
    else:
        if (not doc.summary[0].isupper()):
            errs.append('Summary does not start with a capital letter')
        if (doc.summary[(- 1)] != '.'):
            errs.append('Summary does not end with a period')
        if (doc.is_function_or_method and (doc.summary.split(' ')[0][(- 1)] == 's')):
            errs.append('Summary must start with infinitive verb, not third person (e.g. use "Generate" instead of "Generates")')
        if (doc.num_summary_lines > 1):
            errs.append('Summary should fit in a single line.')
    if (not doc.extended_summary):
        wrns.append('No extended summary found')
    param_errs = doc.parameter_mismatches
    for param in doc.doc_parameters:
        if (not param.startswith('*')):
            if (not doc.parameter_type(param)):
                param_errs.append('Parameter "{}" has no type'.format(param))
            elif (doc.parameter_type(param)[(- 1)] == '.'):
                param_errs.append('Parameter "{}" type should not finish with "."'.format(param))
        if (not doc.parameter_desc(param)):
            param_errs.append('Parameter "{}" has no description'.format(param))
        else:
            if (not doc.parameter_desc(param)[0].isupper()):
                param_errs.append('Parameter "{}" description should start with a capital letter'.format(param))
            if (doc.parameter_desc(param)[(- 1)] != '.'):
                param_errs.append('Parameter "{}" description should finish with "."'.format(param))
    if param_errs:
        errs.append('Errors in parameters section')
        for param_err in param_errs:
            errs.append('\t{}'.format(param_err))
    if doc.is_function_or_method:
        if ((not doc.returns) and ('return' in doc.method_source)):
            errs.append('No Returns section found')
        if ((not doc.yields) and ('yield' in doc.method_source)):
            errs.append('No Yields section found')
    mentioned_errs = doc.mentioned_private_classes
    if mentioned_errs:
        errs.append('Private classes ({}) should not be mentioned in public docstring.'.format(mentioned_errs))
    if (not doc.see_also):
        wrns.append('See Also section not found')
    else:
        for (rel_name, rel_desc) in doc.see_also.items():
            if (not rel_desc):
                errs.append('Missing description for See Also "{}" reference'.format(rel_name))
    for line in doc.raw_doc.splitlines():
        if re.match('^ *\t', line):
            errs.append('Tabs found at the start of line "{}", please use whitespace only'.format(line.lstrip()))
    examples_errs = ''
    if (not doc.examples):
        wrns.append('No examples section found')
    else:
        examples_errs = doc.examples_errors
        if examples_errs:
            errs.append('Examples do not pass tests')
    sys.stderr.write(_output_header('Validation'))
    if errs:
        sys.stderr.write('Errors found:\n')
        for err in errs:
            sys.stderr.write('\t{}\n'.format(err))
    if wrns:
        sys.stderr.write('Warnings found:\n')
        for wrn in wrns:
            sys.stderr.write('\t{}\n'.format(wrn))
    if (not errs):
        sys.stderr.write('Docstring for "{}" correct. :)\n'.format(func_name))
    if examples_errs:
        sys.stderr.write(_output_header('Doctests'))
        sys.stderr.write(examples_errs)
    return len(errs)
Validate the docstring for the given func_name

Parameters
----------
func_name : function
    Function whose docstring will be evaluated

Returns
-------
int
    The number of errors found in the `func_name` docstring
def validate_one(func_name):
    '\n    Validate the docstring for the given func_name\n\n    Parameters\n    ----------\n    func_name : function\n        Function whose docstring will be evaluated\n\n    Returns\n    -------\n    int\n        The number of errors found in the `func_name` docstring\n    '
    func_obj = _load_obj(func_name)
    doc = Docstring(func_name, func_obj)
    sys.stderr.write(_output_header('Docstring ({})'.format(func_name)))
    sys.stderr.write('{}\n'.format(doc.clean_doc))
    errs = []
    wrns = []
    if (doc.start_blank_lines != 1):
        errs.append('Docstring text (summary) should start in the line immediately after the opening quotes (not in the same line, or leaving a blank line in between)')
    if (doc.end_blank_lines != 1):
        errs.append('Closing quotes should be placed in the line after the last text in the docstring (do not close the quotes in the same line as the text, or leave a blank line between the last text and the quotes)')
    if doc.double_blank_lines:
        errs.append('Use only one blank line to separate sections or paragraphs')
    if (not doc.summary):
        errs.append('No summary found (a short summary in a single line should be present at the beginning of the docstring)')
    else:
        if (not doc.summary[0].isupper()):
            errs.append('Summary does not start with a capital letter')
        if (doc.summary[(- 1)] != '.'):
            errs.append('Summary does not end with a period')
        if (doc.is_function_or_method and (doc.summary.split(' ')[0][(- 1)] == 's')):
            errs.append('Summary must start with infinitive verb, not third person (e.g. use "Generate" instead of "Generates")')
        if (doc.num_summary_lines > 1):
            errs.append('Summary should fit in a single line.')
    if (not doc.extended_summary):
        wrns.append('No extended summary found')
    param_errs = doc.parameter_mismatches
    for param in doc.doc_parameters:
        if (not param.startswith('*')):
            if (not doc.parameter_type(param)):
                param_errs.append('Parameter "{}" has no type'.format(param))
            elif (doc.parameter_type(param)[(- 1)] == '.'):
                param_errs.append('Parameter "{}" type should not finish with "."'.format(param))
        if (not doc.parameter_desc(param)):
            param_errs.append('Parameter "{}" has no description'.format(param))
        else:
            if (not doc.parameter_desc(param)[0].isupper()):
                param_errs.append('Parameter "{}" description should start with a capital letter'.format(param))
            if (doc.parameter_desc(param)[(- 1)] != '.'):
                param_errs.append('Parameter "{}" description should finish with "."'.format(param))
    if param_errs:
        errs.append('Errors in parameters section')
        for param_err in param_errs:
            errs.append('\t{}'.format(param_err))
    if doc.is_function_or_method:
        if ((not doc.returns) and ('return' in doc.method_source)):
            errs.append('No Returns section found')
        if ((not doc.yields) and ('yield' in doc.method_source)):
            errs.append('No Yields section found')
    mentioned_errs = doc.mentioned_private_classes
    if mentioned_errs:
        errs.append('Private classes ({}) should not be mentioned in public docstring.'.format(mentioned_errs))
    if (not doc.see_also):
        wrns.append('See Also section not found')
    else:
        for (rel_name, rel_desc) in doc.see_also.items():
            if (not rel_desc):
                errs.append('Missing description for See Also "{}" reference'.format(rel_name))
    for line in doc.raw_doc.splitlines():
        if re.match('^ *\t', line):
            errs.append('Tabs found at the start of line "{}", please use whitespace only'.format(line.lstrip()))
    examples_errs = 
    if (not doc.examples):
        wrns.append('No examples section found')
    else:
        examples_errs = doc.examples_errors
        if examples_errs:
            errs.append('Examples do not pass tests')
    sys.stderr.write(_output_header('Validation'))
    if errs:
        sys.stderr.write('Errors found:\n')
        for err in errs:
            sys.stderr.write('\t{}\n'.format(err))
    if wrns:
        sys.stderr.write('Warnings found:\n')
        for wrn in wrns:
            sys.stderr.write('\t{}\n'.format(wrn))
    if (not errs):
        sys.stderr.write('Docstring for "{}" correct. :)\n'.format(func_name))
    if examples_errs:
        sys.stderr.write(_output_header('Doctests'))
        sys.stderr.write(examples_errs)
    return len(errs)