Replace deprecated optparse dependency
Deprecated since version 2.7: The optparse module is deprecated and will not be developed further; development will continue with the argparse module.
Deprecated since version 2.7: The optparse module is deprecated and will not be developed further; development will continue with the argparse module.