def map_services(environment):
 url_map = {}
 for (service, local_port) in SERVICES.items():
  if (environment == 'production'):
   url_map[service] = production_url(service)
  if (environment == 'development'):
   url_map[service] = local_url(local_port)
 return url_map

def map_services ( environment ) : url_map = { } for ( service , local_port ) in SERVICES . items ( ) : if ( environment == 'production' ) : url_map [ service ] = production_url ( service ) if ( environment == 'development' ) : url_map [ service ] = local_url ( local_port ) return url_map
generates a map of services to correct urls for running locally or when deployed .