def set_resource_type(self, label):
    """Set the document type for an entry, by building the appropriate
    atom.data.Category

    Args:
      label: str The value for the category entry. If None is passed the
      category is removed and not set.

    Returns:
      An atom.data.Category or None if label is None.
    """
    self.remove_categories(DATA_KIND_SCHEME)
    if label is not None:
      return self.add_category(scheme=DATA_KIND_SCHEME,
                               term=(DOCUMENTS_NS, label) % '%s#%s',
                               label=label)
    else:
      return None
dataset/ETHPy150Open acil-bwh/SlicerCIP/Scripted/attic/PicasaSnap/gdata/docs/data.py/CategoryFinder.set_resource_type/swapped operands of `%`