def METHOD_NAME(idx_ctrl_flags, low_nibble) -> bytes:
    # The index of the control flag defines modifies one or more nibbles to modify.
    if idx_ctrl_flags == 0:
        # In this case, all our 4 nibbles have the value of the "low_nibble" as their value
        # Since we're dealing with half bytes, shift one left by 4 and bitwise OR it with the other!
        byte1 = byte2 = low_nibble << 4 | low_nibble
    else:
        # Here we handle 2 special cases together
        nibble_base = low_nibble
        # At these indices exactly, the base value for all nibbles has to be changed:
        if idx_ctrl_flags == 1:
            nibble_base += 1
        elif idx_ctrl_flags == 5:
            nibble_base -= 1
        ns = [nibble_base, nibble_base, nibble_base, nibble_base]
        # In these cases, only specific nibbles have to be changed:
        if 1 <= idx_ctrl_flags <= 4:
            ns[idx_ctrl_flags - 1] -= 1
        else:
            ns[idx_ctrl_flags - 5] += 1
        byte1 = ns[0] << 4 | ns[1]
        byte2 = ns[2] << 4 | ns[3]
    return bytes([byte1, byte2])