def _grab_edges(self, currently_owned):
        grabbed_edges = dict()
        for n_index, neighbor in self.neighbors():
            # ignore self owned edges
            if n_index in currently_owned:
                continue
            # ignore neighbor owned edges
            if neighbor:
                if self.index() in neighbor._owned_edges:
                    continue
            # create edges that didn't exist in self or neighbor
            grabbed_edges[n_index] = Edge(self._grid, self.index(), n_index)
        return grabbed_edges
Build ModelForm from model
dataset/ETHPy150Open kobejohn/polymaze/polymaze/shapes.py/_ComponentShape._grab_edges--crossover with--dataset/ETHPy150Open machinalis/iepy/iepy/webui/corpus/api.py/EOCRUDView.get_form_class