code: def _get_log_entries(self) -> List[Tuple[int, bytes, List[int], bytes]]:
          if self.is_error:
              return []
          else:
              return sorted(itertools.chain(
                  self._log_entries,
                  *(child._get_log_entries() for child in self.children)
              ))