  HIGHLIGHTED_CODE_DIR = os.path.join(settings.MEDIA_ROOT, 'pygments')
  MAX_FILES = 5
  
  def remove_oldest_files(dir, max_files):
      """Remove the oldest files in a directory 'dir', leaving at most 'max_files' remaining"""
      filepaths = [os.path.join(dir, file) for file in os.listdir(dir)]
      ctime_sorted_paths = [item[0] for item in sorted([(path, os.path.getctime(path)) for path in filepaths],
                                                       key=operator.itemgetter(1), reverse=True)]
      [os.remove(path) for path in ctime_sorted_paths[max_files:]]
  
 
</s> remove MAX_FILES = 5
 </s> add MAX_FILES = 20
    """Remove the oldest files in a directory 'dir', leaving at most 'max_files' remaining.
    We use this to limit the number of resources in the sandbox."""
  HIGHLIGHTED_CODE_DIR = os.path.join(settings.MEDIA_ROOT, 'pygments')
  MAX_FILES = 5
  
  def remove_oldest_files(dir, max_files):
    """Remove the oldest files in a directory 'dir', leaving at most 'max_files' remaining.
    We use this to limit the number of resources in the sandbox."""
      filepaths = [os.path.join(dir, file) for file in os.listdir(dir)]
      ctime_sorted_paths = [item[0] for item in sorted([(path, os.path.getctime(path)) for path in filepaths],
                                                       key=operator.itemgetter(1), reverse=True)]
      [os.remove(path) for path in ctime_sorted_paths[max_files:]]
  
keep keep keep keep replace keep keep keep keep keep
 Minor changes to examples and docs 
examples/pygments_api/views.py