refactor/DRY get_network_by_type method