How to fix TypeError: function() missing 1 required positional argument: 'arg' in Python | DevErrors