docs: def _update_port_status_cache(self, device, device_bound=True):
          """Update the ports status cache."""
          with self._cache_lock:
              if device_bound:
                  self._bound_ports.add(device)
                  self._unbound_ports.discard(device)
              else:
                  self._bound_ports.discard(device)
                  self._unbound_ports.add(device)