code: def validate(cls, mapper_spec):
      
      if mapper_spec.input_reader_class() != cls:
        raise BadReaderParamsError("Mapper input reader class mismatch")
      params = _get_params(mapper_spec)
      if cls.BLOB_KEY_PARAM not in params:
        raise BadReaderParamsError("Must specify 'blob_key' for mapper input")
      blob_key = params[cls.BLOB_KEY_PARAM]
      blob_info = blobstore.BlobInfo.get(blobstore.BlobKey(blob_key))
      if not blob_info:
        raise BadReaderParamsError("Could not find blobinfo for key %s" %
                                   blob_key)
docs: Validates mapper spec and all mapper parameters.
  
      Args:
        mapper_spec: The MapperSpec for this InputReader.
  
      Raises:
        BadReaderParamsError: required parameters are missing or invalid.