code: def repr_args(args):
      
      res = []
      for x in args:
          if isinstance(x, tuple) and len(x) == 2:
              key, value = x
              # todo: exclude this key if value is its default
              res += ["%s=%s" % (key, repr_arg(value))]
          else:
              res += [repr_arg(x)]
      return ', '.join(res)
docs: formats a list of function arguments prettily but as working code
  
      (kwargs are tuples (argname, argvalue)