code: def extract_locals(trcback):
      
  
      output = []
      stack = extract_stack(get_inner_most_frame(trcback))
      for frame, file_name, line_number, name, context, index in stack:
          args_names, nameless, keyword = extract_arguments(frame)
          arguments, nameless_args, keyword_args, locals = OrderedDict(), [], {}, {}
          for key, data in frame.f_locals.iteritems():
              if key == nameless:
                  nameless_args = map(repr, frame.f_locals.get(nameless, ()))
              elif key == keyword:
                  keyword_args = dict((arg, repr(value)) for arg, value in frame.f_locals.get(keyword, {}).iteritems())
              elif key in args_names:
                  arguments[key] = repr(data)
              else:
                  locals[key] = repr(data)
          output.append(((name, file_name, line_number), (arguments, nameless_args, keyword_args, locals)))
      return output
docs: Extracts the frames locals of given traceback.
  
      :param trcback: Traceback.
      :type trcback: Traceback
      :return: Frames locals.
      :rtype: list