def METHOD_NAME(elt):
    la,i = elt
    if la is None:
        try:
            ln = i.next()
        except StopIteration:
            ln = None
        except:
            raise MergeError("unexpected IO error")
        return ln
    else:
        elt[0] = None
        return la