code: def kill_session(self, target_session=None):
          
          session_check_name(target_session)
  
          proc = self.cmd('kill-session', '-t%s' % target_session)
  
          if proc.stderr:
              raise exc.LibTmuxException(proc.stderr)
  
          return self
docs: Kill the tmux session with ``$ tmux kill-session``, return ``self``.
  
          Parameters
          ----------
          target_session : str, optional
              target_session: str. note this accepts ``fnmatch(3)``. 'asdf' will
              kill 'asdfasd'.
  
          Returns
          -------
          :class:`Server`
  
          Raises
          ------
          :exc:`exc.BadSessionName`