def is_solr_cloud_mode(self):
    if not hasattr(self, '_solr_cloud_mode'):
      try:
        self.api.collections()
        setattr(self, '_solr_cloud_mode', True)
      except Exception, e:
        LOG.info(e % 'Non SolrCloud server: %s')
        setattr(self, '_solr_cloud_mode', False)
    return getattr(self, '_solr_cloud_mode')

#  def collection_exists(self, collection):
#    return collection in self.get_collections()
dataset/ETHPy150Open cloudera/hue/desktop/libs/indexer/src/indexer/controller2.py/IndexController.is_solr_cloud_mode/swapped operands of `%`