def _make_docstring(method: dict) -> str:
    """Make a docstring for a function.

    :arg method: Method object.

    :returns: Function docstring.
    """
    help_text = ''

    if method['doc']:
        help_text += method['doc']

    if method['parameters']:
        help_text += '\n'

    for parameter in method['parameters']:
        help_text += '\n:arg {} {}:'.format(
            parameter['typename'], parameter['name'])
        if parameter['doc']:
            help_text += ' {}'.format(parameter['doc'])

    if method['return']['fmt']:
        help_text += '\n\n:returns {}:'.format(method['return']['typename'])
        if method['return']['doc']:
            help_text += ' {}'.format(method['return']['doc'])

    return help_text