def do_PUT(self):
        global request_counts

        # extract params
        _id = self.path.split("/")[-1]
        content_len = int(self.headers.getheader('content-length', 0))
        params = json.loads(self.rfile.read(content_len))
        fail_count = params.get('fail_count', 0)

        # retrieve number of requests already served
        processed = request_counts.get(_id, 0)
        if fail_count > processed:
            # return a valid response
            self.send_response(200)
            return

        # increment number of requests and return invalid response
        request_counts[_id] = processed + 1
        return

    # Silence the server so test output is not cluttered
dataset/ETHPy150Open customerio/customerio-python/tests/server.py/Handler.do_PUT/swapped operands of `>`