def __call__(self, environ, start_response):
        cleaver = Cleaver(
            environ,
            self._identity,
            self._backend,
            count_humans_only=self.count_humans_only
        )
        environ[self.environ_key] = cleaver

        if self.allow_override:
            self._handle_variant_overrides(environ)

        #
        # If human verification is required and this request represents
        # a valid AJAX callback (which bots aren't generally capable of), then
        # mark the visitor as human.
        #
        if self.count_humans_only and \
                environ.get('REQUEST_METHOD', '') == 'POST' and \
                environ.get('PATH_INFO', '') in self.human_callback_token:

            fp, length = SplitMiddleware._copy_body_to_tempfile(environ)
            environ.setdefault('CONTENT_LENGTH', length)

            fs = cgi.FieldStorage(
                fp=fp,
                environ=environ,
                keep_blank_values=True
            )

            try:
                try:
                    x = int(fs.getlist('x')[0])
                except (IndexError, ValueError):
                    x = 0
                try:
                    y = int(fs.getlist('y')[0])
                except (IndexError, ValueError):
                    y = 0
                try:
                    z = int(fs.getlist('z')[0])
                except (IndexError, ValueError):
                    z = 0

                # The AJAX call will include three POST arguments, X, Y, and Z
                #
                # Part of the "not a robot test" is validating that X + Y = Z
                # (most web crawlers won't perform complicated Javascript
                # execution like math and HTTP callbacks, because it's just too
                # expensive at scale)
                if x and y and z and x + y == z:
                    # Mark the visitor as a human
                    self._backend.mark_human(cleaver.identity)

                    # If the visitor has been assigned any experiment variants,
                    # tally their participation.
                    for e in self._backend.all_experiments():
                        variant = self._backend.get_variant(
                            cleaver.identity,
                            e.name
                        )
                        if variant:
                            self._backend.mark_participant(e.name, variant)

                    start_response(
                        '204 No Content',
                        [('Content-Type', 'text/plain')]
                    )
                    return []
            except (KeyError, ValueError):
                pass

            start_response(
                '401 Unauthorized',
                [('Content-Type', 'text/plain')]
            )
            return []

        return self.app(environ, start_response)
dataset/ETHPy150Open ryanpetrello/cleaver/cleaver/middleware.py/SplitMiddleware.__call__/swapped operands of `in`