def _binlist_to_int(binlist):
    """
    Convert a binary list to int.

    Do not use. This should be replaces with the similar function in xcoords_to_int.
    """
    out = 0
    for bit in binlist:
        out = out << 1 | int(bit)
    return out
