How to fix TypeError: function() takes 1 positional argument but 2 were given in Python | DevErrors