docs: def filter_unnecessary_segments(query):
      """Filter segments are not needed on CVX"""
      segment_model = segment_models.NetworkSegment
      network_model = models_v2.Network
      query = (query
               .join_if_necessary(network_model)
               .join_if_necessary(segment_model)
               .filter(network_model.project_id != '')
               .filter_network_type())
      return query