def METHOD_NAME(mylist, evtn):
    n = mylist[0][0]
    block = [mylist[0]]
    choosen = [0]
    while n<evtn:
    #print "n,evtn=",n,evtn
    # find the biggest unused #evt that would give n<evtn
        for i in range(len(mylist)):
            # get last not choosen i
            last_i=len(mylist)-1
            while last_i in choosen: last_i += -1
            if i==last_i:
        #print i,"last element reached"
                n += mylist[i][0]
                #print "   new last append: ",i, mylist[i][0], n
                block.append(mylist[i])
                choosen.append(i)
                break
            if i in choosen:
                #print i,"  in choosen, continue..."
                continue
            if n+mylist[i][0]<evtn:
                n += mylist[i][0]
                #print "   new append: ",i, mylist[i][0], n
                block.append(mylist[i])
                choosen.append(i)
                break
        if len(choosen)==len(mylist):
            #print " got everything"
            break
    # pick up unused elements
    newlist = []
    for i in range(len(mylist)):
        if not i in choosen:
            newlist.append(mylist[i])
    print("done makeJobBlock n =",n," len =",len(block))
    return block, newlist, n