code: def sorted_by_field(issues, field="closed_at", reverse=False):
      """Return a list of issues sorted by closing date."""
      return sorted(issues, key=lambda i: i[field], reverse=reverse)
  
file_path: matplotlib/tools/github_stats.py
imports: import sys
  from argparse import ArgumentParser
  from datetime import datetime, timedelta
  from subprocess import check_output
  from gh_api import get_paged_request, make_auth_header, get_pull_request, is_pull_request, get_milestone_id, get_issues_list, get_authors
label_desc: Use image node_id 6 for calling a global function with example usage: sorted_by_field(issues, field, reverse) and returns: sorted