import operator


def _sortIssues(issues):
    """
    Helper function from _formatIssues(). Sort a list of issues by issue number and then by comment
    creation date.

    GIVEN:
      issues (list) -- nested list of issues and their comments

    RETURN:
      new_issues (list) -- the given 'issues' list, but sorted by issue number and comment creation
                           date
    """
    new_issues = sorted(issues, key=operator.itemgetter(3, 9))
    return new_issues