@classmethod
  def validate(cls, job_config):
    """Inherit docs."""
    super(AbstractDatastoreInputReader, cls).validate(job_config)
    params = job_config.input_reader_params


    if cls.ENTITY_KIND_PARAM not in params:
      raise errors.BadReaderParamsError("Missing input reader parameter "
                                        "'entity_kind'")

    if params in cls.BATCH_SIZE_PARAM:
      try:
        batch_size = int(params[cls.BATCH_SIZE_PARAM])
        if batch_size < 1:
          raise errors.BadReaderParamsError("Bad batch size: %s" % batch_size)
      except ValueError, e:
        raise errors.BadReaderParamsError("Bad batch size: %s" % e)

    try:
      bool(params.get(cls.KEYS_ONLY_PARAM, False))
    except:
      raise errors.BadReaderParamsError("keys_only expects a boolean value but "
                                        "got %s",
                                        params[cls.KEYS_ONLY_PARAM])

    if cls.NAMESPACE_PARAM in params:
      if not isinstance(params[cls.NAMESPACE_PARAM],
                        (str, unicode, type(None))):
        raise errors.BadReaderParamsError("Expected a single namespace string")


    if cls.FILTERS_PARAM in params:
      filters = params[cls.FILTERS_PARAM]
      if not isinstance(filters, list):
        raise errors.BadReaderParamsError("Expected list for filters parameter")
      for f in filters:
        if not isinstance(f, (tuple, list)):
          raise errors.BadReaderParamsError("Filter should be a tuple or list: "
                                            "%s", f)
        if len(f) != 3:
          raise errors.BadReaderParamsError("Filter should be a 3-tuple: %s", f)
        prop, op, _ = f
        if not isinstance(prop, basestring):
          raise errors.BadReaderParamsError("Property should be string: %s",
                                            prop)
        if not isinstance(op, basestring):
          raise errors.BadReaderParamsError("Operator should be string: %s", op)
dataset/ETHPy150Open GoogleCloudPlatform/python-compat-runtime/appengine-compat/exported_appengine_sdk/google/appengine/ext/mapreduce/api/map_job/abstract_datastore_input_reader.py/AbstractDatastoreInputReader.validate/swapped operands of `in`