def METHOD_NAME(self, addr, idx=None) -> Generator[ailment.Block, None, None]:
    if not self._blocks_by_addr:
        return
    else:
        if idx is None:
            blocks = self._blocks_by_addr.get(addr, None)
            if blocks is not None:
                yield from blocks
        else:
            block = self._blocks_by_addr_and_idx.get((addr, idx), None)
            if block is not None:
                yield block