def METHOD_NAME(self, cmd):
    # helper function to run events and check for failure
    fail_count = 0
    result = process.run(cmd, shell=True, sudo=True)
    output = result.stdout.decode() + result.stderr.decode()
    if ("not counted" in output) or ("not supported" in output):
        fail_count = fail_count + 1
    if fail_count > 0:
        self.fail("%s : command failed" % cmd)