We have talked about briefly how to read in arguments from the command line using argparse from this post, however, do you know there is really a lot that you might not know about defining a function in Python. How to read optional argument, how to read in positional argument and also how the scope/namespace works. Those are all really interesting questions and you can check out this python documentation – Controlflow.
Second, **kwargs is short keyword arguments. As you can see, it will parse the function input as a dictionary and store the keyword along with its corresponding values in a dictionary.