@classmethod
def _query_exclude_subnets_on_segments(cls, query):
    """Excludes all subnets associated with segments

        For the case where the host is not known, we don't consider any subnets
        that are on segments. But, we still consider subnets that are not
        associated with any segment (i.e. for non-routed networks).
        """
    return query.filter(cls.db_model.segment_id.is_(None))
