Gate: _check_args method, min_inputs and max_inputs parameters added.