def determine_service_endpoints(options):
 result = {}
 default_host_list = [name for name in options.get('service_hosts', '').split(',') if name]
 all_services = SpectatorClient.DEFAULT_SERVICE_PORT_MAP.keys()
 for service in all_services:
  endpoints = _collect_endpoints(service, options, default_host_list)
  if endpoints:
   result[service] = endpoints
 return result

def determine_service_endpoints ( options ) : result = { } default_host_list = [ name for name in options . get ( 'service_hosts' , '' ) . split ( ',' ) if name ] all_services = SpectatorClient . DEFAULT_SERVICE_PORT_MAP . keys ( ) for service in all_services : endpoints = _collect_endpoints ( service , options , default_host_list ) if endpoints : result [ service ] = endpoints return result
determine the list of spectator endpoints to poll .