code: def sorted_by_field(issues, field="closed_at", reverse=False):
      """Return a list of issues sorted by closing date date."""
      return sorted(issues, key=lambda i: i[field], reverse=reverse)
  
file_path: dipy/tools/github_stats.py
imports: import json
  import re
  import sys
  from datetime import datetime, timedelta
  from subprocess import check_output
  from urllib.request import urlopen
label_desc: Use image node_id 8 for calling a global function with example usage: sorted_by_field(issues, field, reverse) and returns: sorted