docs: def filter_by_device_id(query):
      """Filter ports attached to devices we don't care about
  
      Currently used to filter DHCP_RESERVED ports
      """
      port_model = models_v2.Port
      unsupported_device_id_filter = [
          port_model.device_id.notilike('%s%%' % id)
          for id in utils.UNSUPPORTED_DEVICE_IDS]
      query = (query
               .filter(and_(*unsupported_device_id_filter)))
      return query