code: def CaptureFrameLocals(self, frame):
      
      # Capture all local variables (including method arguments).
      variables = {n: self.CaptureNamedVariable(n, v, 1,
                                                self.default_capture_limits)
                   for n, v in six.viewitems(frame.f_locals)}
  
      # Split between locals and arguments (keeping arguments in the right order).
      nargs = frame.f_code.co_argcount
      if frame.f_code.co_flags & inspect.CO_VARARGS: nargs += 1
      if frame.f_code.co_flags & inspect.CO_VARKEYWORDS: nargs += 1
  
      frame_arguments = []
      for argname in frame.f_code.co_varnames[:nargs]:
        if argname in variables: frame_arguments.append(variables.pop(argname))
  
      return (frame_arguments, list(six.viewvalues(variables)))
docs: Captures local variables and arguments of the specified frame.
  
      Args:
        frame: frame to capture locals and arguments.
  
      Returns:
        (arguments, locals) tuple.