return the intersection of sets a and b, counting any overlap between 'cloned' predecessors. The returned set is in terms of the entities present within 'a'.
(a: Iterable[_CLE], b: Iterable[_CLE])
| 344 | |
| 345 | |
| 346 | def _cloned_intersection(a: Iterable[_CLE], b: Iterable[_CLE]) -> Set[_CLE]: |
| 347 | """return the intersection of sets a and b, counting |
| 348 | any overlap between 'cloned' predecessors. |
| 349 | |
| 350 | The returned set is in terms of the entities present within 'a'. |
| 351 | |
| 352 | """ |
| 353 | all_overlap: Set[_CLE] = set(_expand_cloned(a)).intersection( |
| 354 | _expand_cloned(b) |
| 355 | ) |
| 356 | return {elem for elem in a if all_overlap.intersection(elem._cloned_set)} |
| 357 | |
| 358 | |
| 359 | def _cloned_difference(a: Iterable[_CLE], b: Iterable[_CLE]) -> Set[_CLE]: |
no test coverage detected