<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _check_coop(self, pore, queue):
 r""" Method run in loop after every pore invasion. All connecting throats are now given access to the invading phase. Two throats with access to the invading phase can cooperatively fill any pores that they are both connected to, common pores. The invasion of theses throats connected to the common pore is handled elsewhere. """

        net = self.project.network
        t_inv = 'throat.invasion_sequence'
        p_inv = 'pore.invasion_sequence'
        for throat in net.find_neighbor_throats(pores=pore):
            # A pore has just been invaded, all it's throats now have
            # An interface residing inside them
            if self[t_inv][throat] == -1:
                # If the throat is not the invading throat that gave access
                # to this pore, get the pores that this throat connects with
                a = set(net['throat.conns'][throat])
                # Get a list of pre-calculated coop filling pressures for all
                # Throats this throat can coop fill with
                ts_Pc = self.tt_Pc.data[throat]
                # Network indices of throats that can act as filling pairs
                ts = self.tt_Pc.rows[throat]
                # If there are any potential coop filling throats
                if np.any(~np.isnan(ts_Pc)):
                    ts_Pc = np.asarray(ts_Pc)
                    ts = np.asarray(ts)
                    ts = ts[~np.isnan(ts_Pc)]
                    ts_Pc = ts_Pc[~np.isnan(ts_Pc)]
                    # For each throat find the common pore and the uncommon
                    # pores
                    for i, t in enumerate(ts):
                        # Find common pore (cP) and uncommon pores (uPs)
                        b = set(net['throat.conns'][t])
                        cP = list(a.intersection(b))
                        uPs = list(a.symmetric_difference(b))
                        # If the common pore is not invaded but the others are
                        # The potential coop filling event can now happen
                        # Add the coop pressure to the queue
                        if ((np.all(self[p_inv][uPs] > -1)) and
                           (self[p_inv][cP] == -1)):
                            # Coop pore filling fills the common pore
                            # The throats that gave access are not invaded now
                            # However, isolated throats between invaded pores
                            # Are taken care of elsewhere...
                            hq.heappush(queue, [ts_Pc[i], list(cP), 'pore'])