code: def get_function_args(func, no_self=False, no_varargs=False):
      par_dict = signature(func).parameters
      pos = lambda x: x.kind == Parameter.VAR_POSITIONAL
      kw = lambda x: x.kind == Parameter.VAR_KEYWORD
      opts = ["", "*", "**"]
      args = [
          "{prefix}{arg}".format(prefix=opts[pos(value) + 2 * kw(value)], arg=par)
          for par, value in par_dict.items()
      ]
      self_filtered_args = (
          args if not args else (args[1 if (args[0] == "self") and no_self else 0 :])
      )
      pos = lambda x: (len(x) > 1) and (x[0] == "*") and (x[1] != "*")
      kw = lambda x: (len(x) > 2) and (x[:2] == "**")
      varargs_filtered_args = [
          arg
          for arg in self_filtered_args
          if (not no_varargs) or all([no_varargs, not pos(arg), not kw(arg)])
      ]
      return tuple(varargs_filtered_args)