code: def handle_keywords(self, func, node, offset=0):
          '''
          Gather keywords to positional argument information
  
          Assumes the named parameter exist, raises a KeyError otherwise
          '''
          func_argument_names = {}
          for i, arg in enumerate(func.args.args[offset:]):
              assert isinstance(arg, ast.Name)
              func_argument_names[arg.id] = i
  
          nargs = len(func.args.args) - offset
          defaults = func.args.defaults
          keywords = {func_argument_names[kw.arg]: kw.value
                      for kw in node.keywords}
          node.args.extend([None] * (1 + max(keywords.keys()) - len(node.args)))
  
          replacements = {}
          for index, arg in enumerate(node.args):
              if arg is None:
                  if index in keywords:
                      replacements[index] = deepcopy(keywords[index])
                  else:  # must be a default value
                      replacements[index] = deepcopy(defaults[index - nargs])
          return replacementf handle_keywords(self, func, node, offset=0):
          '''
          Gather keywords to positional argument information
  
          Assumes the named parameter exist, raises a KeyError otherwise
          '''
          func_argument_names = {}
          for i, arg in enumerate(func.args.args[offset:]):
              assert isinstance(arg, ast.Name)
              func_argument_names[arg.id] = i
  
          nargs = len(func.args.args) - offset
          defaults = func.args.defaults
          keywords = {func_argument_names[kw.arg]: kw.value
                      for kw in node.keywords}
          node.args.extend([None] * (1 + max(keywords.keys()) - len(node.args)))
  
          replacements = {}
          for index, arg in enumerate(node.args):
              if arg is None:
                  if index in keywords:
                      replacements[index] = deepcopy(keywords[index])
                  else:  # must be a default value
                      replacements[index] = deepcopy(defaults[index - nargs])
          return replacements
docs: Gather keywords to positional argument information
  
          Assumes the named parameter exist, raises a KeyError otherwise