code: def after_invoke(self, coro):
          
          if not asyncio.iscoroutinefunction(coro):
              raise TypeError('The post-invoke hook must be a coroutine.')
  
          self._after_invoke = coro
          return coro
docs: A decorator that registers a coroutine as a post-invoke hook.
  
          A post-invoke hook is called directly after the command is
          called. This makes it a useful function to clean-up database
          connections or any type of clean up required.
  
          This post-invoke hook takes a sole parameter, a :class:`.Context`.
  
          See :meth:`.Bot.after_invoke` for more info.
  
          Parameters
          -----------
          coro: :ref:`coroutine <coroutine>`
              The coroutine to register as the post-invoke hook.
  
          Raises
          -------
          TypeError
              The coroutine passed is not actually a coroutine.