def get_hosts_mapped_with_segments(context):
 segment_host_mapping = network.SegmentHostMapping.get_objects(context)
 return {row.host for row in segment_host_mapping}

def get_hosts_mapped_with_segments ( context ) : segment_host_mapping = network . SegmentHostMapping . get_objects ( context ) return { row . host for row in segment_host_mapping }
get hosts that are mapped with segments .