def find_extra_surface_nodeids(nodeids, sorted_large_nodes):
    """ Finds nodeids present in the aligned matched region of the large DMRS,
        but which have no equivalents in the small DMRS.

        :param nodeids Nodeids from the large DMRS which have equivalents in the small one, sorted by span_pred_key of
        their nodes.
        :param sorted_large_nodes A list of nodes of the large DMRS sorted by span_pred_key.

        :return A list of additional nodeids sharing the span with nodeids but without equivalents in the small DMRS.
    """
    extra_nodeids = []
    max_cto = 0
    reached_start = False
    reached_end = False
    for i, node in enumerate(sorted_large_nodes):
        if node.nodeid == nodeids[0]:
            first_overlap_orderid = i
            min_cfrom = node.cfrom
            max_cto = node.cto
            while True and first_overlap_orderid > 0:
                prev_node = sorted_large_nodes[first_overlap_orderid - 1]
                prev_cfrom = prev_node.cfrom
                if prev_cfrom == min_cfrom:
                    first_overlap_orderid -= 1
                    extra_nodeids.append(prev_node.nodeid)
                    max_cto = max(max_cto, prev_node.cto)
                else:
                    break
            reached_start = True
        elif not reached_start:
            continue
        elif reached_end and node.cfrom >= max_cto:
            break
        else:
            max_cto = max(max_cto, node.cto)
            if node.nodeid not in nodeids and node.nodeid not in extra_nodeids:
                extra_nodeids.append(node.nodeid)
        if node.nodeid == nodeids[-1]:
            reached_end = True
    return extra_nodeids
