code: def do_session_endpoint(self, params):
          
          if invalid_hosts(params.hosts):
              self.show_output("List of hosts has the wrong syntax.")
              return
  
          try:
              info_by_id = self._zk.sessions_info(params.hosts)
          except XClient.CmdFailed as ex:
              self.show_output(str(ex))
              return
  
          info = info_by_id.get(params.session, None)
          if info is None:
              self.show_output("No session info for %s.", params.session)
          else:
              self.show_output("%s", info.resolved_endpoints if params.reverse else info.endpoints)
docs: \x1b[1mNAME\x1b[0m
          session_endpoint - Gets the session's IP endpoints
  
  \x1b[1mSYNOPSIS\x1b[0m
          session_endpoint <session> <hosts> [reverse_lookup]
  
  \x1b[1mDESCRIPTION\x1b[0m
          where hosts is a list of hosts in the host1[:port1][,host2[:port2]],... form
  
  \x1b[1mOPTIONS\x1b[0m
          * reverse_lookup: convert IPs back to hostnames (default: false)
  
  \x1b[1mEXAMPLES\x1b[0m
          > session_endpoint 0xa4788b919450e6 10.0.0.1,10.0.0.2,10.0.0.3
          10.3.2.12:54250 10.0.0.2:2181