def endpoint_access(self, method):
        """
        Determine access level needed for endpoint
        :param method: The request verb
        :return: String representing access type.
        """
        if method == 'OPTIONS':
            # The CORS pre-flight checks should not require authentication
            return self.UNAUTHENTICATED_ACCESS
        elif self.METHOD_ACCESS not in method:
            logging.error('Cannot determine access needed for %s method', method)
            raise HTTPError(500, 'Internal Server Error')

        return self.METHOD_ACCESS[method]
dataset/ETHPy150Open openpermissions/koi/koi/base.py/AuthHandler.endpoint_access/swapped operands of `not in`