code: def _find_new_ancestors(cls, db: BaseDB, header: BlockHeader) -> Iterable[BlockHeader]:
          
          h = header
          while True:
              try:
                  orig = cls._get_canonical_block_header_by_number(db, h.block_number)
              except HeaderNotFound:
                  # This just means the block is not on the canonical chain.
                  pass
              else:
                  if orig.hash == h.hash:
                      # Found the common ancestor, stop.
                      break
  
              # Found a new ancestor
              yield h
  
              if h.parent_hash == GENESIS_PARENT_HASH:
                  break
              else:
                  h = cls._get_block_header_by_hash(db, h.parent_hash)
docs: Returns the chain leading up from the given header until (but not including)
          the first ancestor it has in common with our canonical chain.
  
          If D is the canonical head in the following chain, and F is the new header,
          then this function returns (F, E).
  
          A - B - C - D
                 \
                  E - F