def METHOD_NAME(segments):
    used = 0
    number = 0
    available = []
    for (segment, size) in segments.items():
        if not size:
            continue
        used += size
        number += 1
        available.append((number, segment, size))
    return (number, used, available)