def METHOD_NAME(issues, section_title):
    if not issues:
        return
    # Generate the formated printout
    bugs = [issue for issue in issues if issue['type'] == 'bug']
    bugs = sorted(bugs, key=lambda k: "%s %d" % (k['component'], k['number']))
    enhancements = [issue for issue in issues if issue['type'] == 'enhancement']
    enhancements = sorted(enhancements, key=lambda k: "%s %d" % (k['component'], k['number']))
    features = [issue for issue in issues if issue['type'] == 'feature']
    features = sorted(features, key=lambda k: "%s %d" % (k['component'], k['number']))
    if not option_doc:
        print('\n#', section_title)
        print()
        if features:
            print('## Features\n')
            for issue in features:
                print(format_issue(issue))
            print('')
        if enhancements:
            print('## Enhancements\n')
            for issue in enhancements:
                print(format_issue(issue))
            print('')
        if bugs:
            print('## Bugs\n')
            for issue in bugs:
                print(format_issue(issue))
    else:
        print('\n##', section_title)
        print()
        if features:
            print('### Features\n')
            for issue in features:
                print(format_issue(issue, doc=True))
            print('')
        if enhancements:
            print('### Enhancements\n')
            for issue in enhancements:
                print(format_issue(issue, doc=True))
            print('')
        if bugs:
            print('### Bugs\n')
            for issue in bugs:
                print(format_issue(issue, doc=True))