def synchronize(self, async_method):
        """
        @param async_method:        Bound method of a MotorClient,
                                    MotorDatabase, etc.
        @return:                    A synchronous wrapper around the method
        """
        @functools.wraps(async_method)
        def synchronized_method(*args, **kwargs):
            # Motor doesn't support 'safe'; simulate it.
            if 'safe' in kwargs:
                safe = kwargs.pop('safe')
                if not isinstance(safe, bool):
                    raise TypeError(safe % '%r not valid for "safe"')

                kwargs['w'] = 1 if safe else 0

            @functools.wraps(async_method)
            def partial():
                return async_method(*args, **kwargs)

            return IOLoop.current().run_sync(partial)
    
        return synchronized_method

    # Motor doesn't support these deprecated attrs, but PyMongo still tests
    # that its classes do.
dataset/ETHPy150Open mongodb/motor/synchro/__init__.py/Synchro.synchronize/swapped operands of `%`