docstr: Function prints provided statistics
  :param stats: Dictionary with statistics
  :param functions: Functions to be executed on statistics
  :param output: Object which provides display method for printing
  :param nskip: Number of measurements to be skipped in functions
docstr_tok: ["Function","prints","provided","statistics",":","param","stats",":","Dictionary","with","statistics",":","param","functions",":","Functions","to","be","executed","on","statistics",":","param","output",":","Object","which","provides","display","method","for","printing",":","param","nskip",":","Number","of","measurements","to","be","skipped","in","functions"]
code: def print_stats(stats, functions=None, output=None, nskip=0):
      """
      Function prints provided statistics
      :param stats: Dictionary with statistics
      :param functions: Functions to be executed on statistics
      :param output: Object which provides display method for printing
      :param nskip: Number of measurements to be skipped in functions
      """
      if not stats:
          raise ValueError("Provide stats")
  
      if not output:
          output = neon_logger
      elif not hasattr(output, "display"):
          raise TypeError(
              "Argument output must implement display method"
          )
  
      if not functions:
          functions = (np.mean, np.median, np.min, np.max)
  
      function_names = tuple(
          function.__name__.title() for function in functions
      )
  
      fmt_titles = (
          "| {name:^33} ".format(name="Func")
          + "| {:^11} " * len(function_names)
          + "|    Units    |"
      )
      fmt_nums = (
          "| {func:<33} "
          + "|  {%s:<10.5g} " * len(function_names) % function_names
          + "| {units:^11} |"
      )
  
      head_str = fmt_titles.format(*function_names)
      sep = "+" + "-" * (len(head_str) - 2) + "+"
  
      msg = "\n{sep:}\n|{prefix:-^105}|\n".format(
          sep=sep,
          prefix="  Intel Neon Benchmark: 0.0.2 Neon Version: %s  "
          % __neon_version__[:5],
      )
      msg += "%s\n%s\n%s\n" % (sep, head_str, sep)
      out_stats = {}
      for step in stats:
          if not any(stats[step]):
              continue
          timesu = np.array(stats[step][nskip:])  # in ms
          out_stats[step] = {}
          for function in functions:
              out_stats[step][function.__name__.title()] = function(
                  timesu
              )
          msg += "%s\n" % fmt_nums.format(
              units="msec", func=step, **out_stats[step]
          )
      msg += sep
  
      output.display(msg)
  
file_path: neon/neon/benchmark/benchmark.py
imports: from functools import wraps
  from neon import NervanaObject
  from collections import OrderedDict
  from neon import __version__
  from neon import logger
  from neon.layers.container import LayerContainer
  import numpy
label_desc: Use image node_id 5 for calling the Benchmark obj's underlying member method code with example usage: obj.print_stats(stats, functions, output, nskip) without return types