human
argparse customize action.
assistant
Here is a Python program to argparse customize action
import sys

import argparse

def _customize_action(option, opt_str, value, parser):
  """Customize argparse action."""
  if option == "--help":
    parser.print_help()
  elif option == "--version":
    print(("%s %s" % (sys.version, sys.argv[0])))
  else:
    parser.set_defaults(**{option: value})

# Enter the option
option = "--option"

# Enter the value
value = "value"

# Calling the function
print((_customize_action(option, "option", value, argparse.ArgumentParser())))

#Example Output
# None

#Remember to inspect code for bugs.