def validate_params(self, params):
        """
        Validates params against expected types for this function.
        Raises RpcException if the params are invalid.
        """
        if params is not None:
            # check param lengths match
            if len(self.params) != len(params):
                vals = (self.full_name, len(self.params), len(params))
                msg = vals % "Function '%s' expects %d param(s). %d given."
                raise RpcException(ERR_INVALID_PARAMS, msg)

            # compare each expected and given param
            [self._validate_param(x, y) for (x, y) in zip(self.params, params)]
dataset/ETHPy150Open StackHut/stackhut/stackhut_toolkit/common/barrister/runtime.py/Function.validate_params/swapped operands of `%`