Could use a `defaultdict(list)` for these dictionaries to save that step. Also `has_key` is deprecated, just use `rank in self._receives`.