code: def keysorted(d):
      """Get the items from a dict, sorted by key.
  
      Example
      -------
      >>> keysorted({'c': 1, 'b': 2, 'a': 3})
      [('a', 3), ('b', 2), ('c', 1)]
      """
      return sorted(iteritems(d), key=itemgetter(0))
  
file_path: zipline/zipline/utils/functional.py
imports: from functools import reduce
  from operator import itemgetter
  from pprint import pformat
  from six import viewkeys, iteritems
  from six.moves import map, zip
  from toolz import curry, flip
  from .sentinel import sentinel
label_desc: Use image node_id 12 for calling a global function with example usage: keysorted(d) and returns: sorted