code: def sort_references_dict(refs):
      
  
      if _use_odict:
          refs_sorted = OrderedDict()
      else:
          refs_sorted = dict()
  
      # We insert this first, That is ok - it will be overwritten
      # with the sorted version later
      refs_sorted['molssi_bse_schema'] = refs['molssi_bse_schema']
  
      # This sorts the entries by reference key (author1985a, etc)
      for k, v in sorted(refs.items()):
          refs_sorted[k] = sort_single_reference(v)
  
      return refs_sorted
docs: Sorts a reference dictionary into a standard order
  
      The keys of the references are also sorted, and the keys for the data for each
      reference are put in a more canonical order.