I am writing a script that accepts multiple arguments, some are optional but should be provided together, how can I achieve this behaviour?
Ex: arg1 is a required argument
opt-arg-1 and opt-arg-2 should be provided together or none at all
python my_script.py --arg1 val1 # Works fine
python my_script.py --arg1 val1 --opt-arg-1 other_val # Error both opt-arg-1 and opt-arg-2 should be provided
python my_script.py --arg1 val1 --opt-arg-2 other_val # Error both opt-arg-1 and opt-arg-2 should be provided
python my_script.py --arg1 val1 --opt-arg-1 other_val --opt-arg-2 other_val_2 # Works fine