<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def use_mock(self, mock, *args, **kwarg):
 """ Context manager or decorator in order to use a coroutine as mock of service endpoint in a test. :param mock: Coroutine to use as mock. It should behave like :meth:`~ClientSession.request`. :type mock: coroutine :param service_name: Name of service where you want to use mock. If None it will be used as soon as possible. :type service_name: str :param endpoint: Endpoint where you want to use mock. If None it will be used as soon as possible. :type endpoint: str :param offset: Times it must be ignored before use. Default 0. Only positive integers. :type offset: int :param limit: Times it could be used. Default 1. 0 means no limit. Only positive integers. :type limit: int :return: UseMockDefinition """

        return UseMockDefinition(mock, self, *args, **kwarg)