code: def split_by_value( total, nodes, headdivisor=2.0 ):
      
      head_sum,tail_sum = 0,0
      divider = 0
      for node in nodes[::-1]:
          if head_sum < total/headdivisor:
              head_sum += node[0]
              divider -= 1
          else:
              break
      return (head_sum,nodes[divider:]),(total-head_sum,nodes[:divider])
docs: Produce, (sum,head),(sum,tail) for nodes to attempt binary partition