def _checkParam(param, value, paramlimits, paramtypes):
assert param in paramlimits, "<STR_LIT>".format(param)<EOL>(lowlim, highlim) = paramlimits[param]<EOL>paramtype = paramtypes[param]<EOL>if isinstance(paramtype, tuple):<EOL><INDENT>(paramtype, paramshape) = paramtype<EOL>if not (isinstance(value, paramtype)):<EOL><INDENT>raise ValueError("<STR_LIT>".format(<EOL>param, paramtype, type(param)))<EOL><DEDENT>if value.shape != paramshape:<EOL><INDENT>raise ValueError("<STR_LIT>".format(<EOL>param, paramshape, value.shape))<EOL><DEDENT>if value.dtype != '<STR_LIT:float>':<EOL><INDENT>raise ValueError("<STR_LIT>".format(<EOL>param, value.dtype))<EOL><DEDENT>if not ((lowlim <= value).all() and (value <= highlim).all()):<EOL><INDENT>raise ValueError("<STR_LIT>".format(<EOL>param, lowlim, highlim, value))<EOL><DEDENT><DEDENT>else:<EOL><INDENT>if not isinstance(value, paramtype):<EOL><INDENT>raise ValueError("<STR_LIT>".format(<EOL>param, paramtype, type(value)))<EOL><DEDENT>if not (lowlim <= value <= highlim):<EOL><INDENT>raise ValueError("<STR_LIT>".format(<EOL>param, lowlim, highlim, value))<EOL><DEDENT><DEDENT>
Checks if `value` is allowable value for `param`.

    Raises except if `value` is not acceptable, otherwise
    returns `None` if value is acceptable.

    `paramlimits` and `paramtypes` are the `PARAMLIMITS`
    and `PARAMTYPES` attributes of a `Model`.