def _check_required_together(self, spec):
        if spec is None:
            return
        for check in spec:
            counts = [ self._count_terms([field]) for field in check ]
            non_zero = [ c for c in counts if c > 0 ]
            if len(non_zero) > 0:
                if 0 in counts:
                    self.fail_json(msg="parameters are required together: %s" % check)
dataset/ETHPy150Open glenjarvis/ansible_tutorial/src/example_03/ansible_module.py/AnsibleModule._check_required_together/original