def bin_to_int(bin_string: str, *, zero: str = "0", one: str = "1") -> int:
    """
    Convert a binary string to an integer.

    This function accepts optional keyword arguments to specify
    the characters used for 0 and 1 in the string to support
    different encodings.
    """
    return int(bin_string.replace(zero, "0").replace(one, "1"), base=2)