code: def sort_items(items):
      
  
      sorted_items = {}
      for item in items:
          category = lookup(item, 'itemCategory', 'categoryCode')
          if sorted_items.get(category) is None:
              sorted_items[category] = []
          sorted_items[category].append(item)
  
      return sorted_items
docs: sorts the items into a dictionary of categories, with a list of items