def METHOD_NAME(self, paramdict, operation):
    params = paramdict.keys()
    if not self._queries:  # empty. anything goes
        return len(params)
    if operation != self._queries[0]['operation']:
        raise Exception('You cannot mix updates and gets')
    if not len(self._queries[0]['search']) == len(params):  # check each entry against first one
        raise Exception('You introduced a mismatched parameter set into your batch.')
    if not len(set(params)) == len(params):
        raise Exception('Duplicate field names were detected in this entry')
    return len(params)