def _invalidate_ports(dpid):
 if (dpid in _dirty_switches):
  return
 t = Timer(_coalesce_period, _check_ports, args=(dpid,))
 _dirty_switches[dpid] = t

def _invalidate_ports ( dpid ) : if ( dpid in _dirty_switches ) : return t = Timer ( _coalesce_period , _check_ports , args = ( dpid , ) ) _dirty_switches [ dpid ] = t
registers the fact that port info for dpid may be out of date when the spanning tree adjusts the port flags .