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])
| 356 | |
| 357 | |
| 358 | def _cloned_intersection(a: Iterable[_CLE], b: Iterable[_CLE]) -> Set[_CLE]: |
| 359 | """return the intersection of sets a and b, counting |
| 360 | any overlap between 'cloned' predecessors. |
| 361 | |
| 362 | The returned set is in terms of the entities present within 'a'. |
| 363 | |
| 364 | """ |
| 365 | all_overlap: Set[_CLE] = set(_expand_cloned(a)).intersection( |
| 366 | _expand_cloned(b) |
| 367 | ) |
| 368 | return {elem for elem in a if all_overlap.intersection(elem._cloned_set)} |
| 369 | |
| 370 | |
| 371 | def _cloned_difference(a: Iterable[_CLE], b: Iterable[_CLE]) -> Set[_CLE]: |
no test coverage detected