class_docstr: Thread-safe call log.
  
  The call log is an ordered dictionary containing all previous function calls.
  Its keys are dictionaries representing the arguments and its values are the
  function values. As dictionaries can't be used as keys in dictionaries,
  a custom internal representation is used.
class_docstr_tok: ["Thread-safe","call","log",".","The","call","log","is","an","ordered","dictionary","containing","all","previous","function","calls",".","Its","keys","are","dictionaries","representing","the","arguments","and","its","values","are","the","function","values",".","As","dictionaries","ca","n't","be","used","as","keys","in","dictionaries",",","a","custom","internal","representation","is","used","."]
docstr: Returns given call_log into a dictionary.
  
  The result is a dict with the following structure:
  ``{'args': {'argname': []}, 'values': []}``
  
  >>> call_log = CallLog()
  >>> call_log.insert(3, x=1, y=2)
  >>> d = call_log.to_dict()
  >>> d['args']['x']
  [1]
  >>> d['args']['y']
  [2]
  >>> d['values']
  [3]
docstr_tok: ["Returns","given","call_log","into","a","dictionary",".","The","result","is","a","dict","with","the","following","structure",":","``","{","'args","'",":","{","'argname","'",":","[","]","}",",","'values","'",":","[","]","}","``",">",">",">","call_log","=","CallLog","(",")",">",">",">","call_log.insert","(","3",",","x=1",",","y=2",")",">",">",">","d","=","call_log.to_dict","(",")",">",">",">","d","[","'args","'","]","[","'","x","'","]","[","1","]",">",">",">","d","[","'args","'","]","[","'","y","'","]","[","2","]",">",">",">","d","[","'values","'","]","[","3","]"]
code: def to_dict(self):
      """Returns given call_log into a dictionary.
  
      The result is a dict with the following structure:
      ``{'args': {'argname': []}, 'values': []}``
  
      >>> call_log = CallLog()
      >>> call_log.insert(3, x=1, y=2)
      >>> d = call_log.to_dict()
      >>> d['args']['x']
      [1]
      >>> d['args']['y']
      [2]
      >>> d['values']
      [3]
  
      """
      if self.data:
          args = collections.defaultdict(list)
          values = []
          for k, v in self.data.items():
              for key, value in k:
                  args[key].append(value)
              values.append(v)
          return {"args": dict(args), "values": values}
      else:
          return {"args": {}, "values": []}
  
imports: import collections
  import functools
  import threading
  import operator
label_desc: Use image node_id 18 for calling the CallLog obj's underlying member method code with example usage: obj.to_dict() and returns: dict, dict