def order_flag_options(key, value):
    """Return the options key value pairs in the correct order (bit (int), name (str)).

    Args:
        key (int/str): Bit int or name.
        value (str/int): Name or bit int.

    Returns:
        option (tuple): (bit (int), name (str))
    """
    if isinstance(key, int):
        bit = key
        name = str(value)
    else:
        bit = int(value)
        name = str(key)
    return bit, name
