code: def _sync_enter(self):
      
      if hasattr(self, 'loop'):
          loop = self.loop
      else:
          loop = self._client.loop
  
      if loop.is_running():
          raise RuntimeError(
              'You must use "async with" if the event loop '
              'is running (i.e. you are inside an "async def")'
          )
  
      return loop.run_until_complete(self.__aenter__())
docs: Helps to cut boilerplate on async context
      managers that offer synchronous variants.