code: def test(features, examples, batchsize, layers, units):
      # prepare the data for the given input dimensions
      data.prepare(features, examples, batchsize)
  
      # create models / evaluation functions
      models = create_models(features, layers, units)
  
      # storage for measured runtimes
      times = collections.OrderedDict(
          (name, []) for name in models.keys()
      )
  
      # loop through batches and evaluation functions
      for batch in data:
          for name, fn in models.items():
              t1 = time.time()
              fn(batch)
              times[name].append(time.time() - t1)
  
      for name, l in times.items():
          a = np.array(l)
          times[name] = {
              "total": np.sum(a),
              "mean": np.mean(a),
              "variance": np.var(a),
          }
  
      return times
  
file_path: tfdeploy/tests/perf/measure_runtimes.py
imports: import os
  import time
  import json
  import uuid
  import itertools
  import collections
  import numpy
  import tensorflow
  import tfdeploy
label_desc: Use image node_id 3 for calling a global function with example usage: test(features, examples, batchsize, layers, units) and returns: times