code: def test_sortedby():
      try_sort("id", lambda d: d["id"])
      try_sort("id", lambda d: d["id"], limit=5)
      try_sort("id", lambda d: d["id"], reverse=True)
      try_sort("id", lambda d: d["id"], limit=5, reverse=True)
  
imports: from __future__ import with_statement
  from datetime import datetime, timedelta
  import random
  from whoosh import fields, query, sorting, columns
  from whoosh.compat import u
  from whoosh.compat import permutations, xrange
  from whoosh.filedb.filestore import RamStorage
  from whoosh.util.testing import TempIndex
label_desc: Use image node_id 5 for calling a global function with example usage: test_sortedby() without return types