A decorator used to activate the mocker.

        :param prefix:
        :param backend: An instance of a storage backend.

def activate(self, prefix=None, backend=None):
        """
        A decorator used to activate the mocker.

        :param prefix:
        :param backend: An instance of a storage backend.
        """
        if isinstance(prefix, compat.string_types):
            self.prefix = prefix

        if isinstance(backend, RmoqStorageBackend):
            self.backend = backend

        def activate(func):
            if isinstance(func, type):
                return self._decorate_class(func)

            def wrapper(*args, **kwargs):
                with self:
                    return func(*args, **kwargs)

            return wrapper

        return activate