def getCategories(items):
  cats = set()
  for i in items:
    if i['categories']:
      cats.update(i['categories'])
  return cats

###
### Template context operations
###
Get all the categories in the list of items.
dataset/ETHPy150Open DeanCutlet/filestack/views.py/getCategories