docs: def validate_categories(categories):
          """Take an iterable of source categories and raise ValueError if some 
          of them are invalid."""
          if not set(categories) <= Source.categories:
              invalid = list(set(categories) - Source.categories)
              raise ValueError('Invalid categories: %s' % invalid)