code: def iter_def_argspec(self):
          
          started_kwargs = False
          seen_vars = set()
  
          for var, value in self.argpairs:
              if var is None:
                  # value is actually the name
                  var = value
                  value = None
  
                  if started_kwargs:
                      raise SyntaxError(
                          "Required argument %r must precede optional arguments"
                          % (var.name,))
  
              else:
                  started_kwargs = True
  
              if not isinstance(var, Variable):
                  raise SyntaxError("Expected variable name, got %r" % (var,))
  
              if var.name in seen_vars:
                  raise SyntaxError("Duplicate argument %r" % (var.name,))
              seen_vars.add(var.name)
  
              yield var.name, value
docs: Interpreting this literal as a function definition, yields pairs of
          (variable name as a string, default value as an AST node or None).