code: def call_log2dataframe(log):
      """Converts a call log into a pandas data frame.
      This function errors if you don't have pandas available.
  
      :param log: call log to be converted, as returned by e.g. `optunity.minimize`
      :returns: a pandas data frame capturing the same information as the call log
  
      """
      if not _pandas_available:
          raise NotImplementedError("This function requires pandas")
  
      args = log["args"]
      values = log["values"]
      hpar_names = args.keys()
  
      # construct a list of dictionaries
      zipped = zip(zip(*args.values()), values)
      dictlist = [
          dict(
              [(k, v) for k, v in zip(hpar_names, args)]
              + [("value", value)]
          )
          for args, value in zipped
      ]
      df = pandas.DataFrame(dictlist)
      return df
  
imports: import collections
  import functools
  import threading
  import operator
label_desc: Use image node_id 6 for calling a global function with example usage: call_log2dataframe(log) and returns: df