code: def hosts_to_endpoints(hosts, port=2181):
      
      endpoints = []
      for host in hosts.split(","):
          endpoints.append(tuple(host.rsplit(":", 1)) if ":" in host else (host, port))
      return endpoints
docs: return a list of (host, port) tuples from a given host[:port],... str