code: def params_to_vectors(params, tunables):
      """
      Converts a list of parameter vectors (with metadata) into a numpy array
      ready for BTB tuning.
  
      Args:
          params: list of hyperparameter vectors. Each vector is a dict mapping
              the names of parameters to those parameters' values.
          tunables: list of HyperParameter metadata structures describing all
              the optimizable hyperparameters that should be in each vector. e.g.
  
          tunables = [('C',  HyperParameter(type='float_exp', range=(1e-5, 1e5))),
                      ('degree',  HyperParameter('int', (2, 4))),
                      ('gamma',  HyperParameter('float_exp', (1e-05, 1e5)))]
  
      Returns:
          vectors: np.array of parameter vectors ready to be optimized by a
              Gaussian Process (or what have you).
              vectors.shape = (len(params), len(tunables))
      """
      # make sure params is iterable
      if not isinstance(params, (list, np.ndarray)):
          params = [params]
  
      keys = [k[0] for k in tunables]
      vectors = np.zeros((len(params), len(keys)))
      for i, p in enumerate(params):
          for j, k in enumerate(keys):
              vectors[i, j] = p[k]
  
      return vectors
  
imports: from __future__ import absolute_import, unicode_literals
  import base64
  import hashlib
  import json
  import logging
  import os
  import pickle
  from builtins import str
  import numpy
  from atm.compat import getargs
label_desc: Use image node_id 10 for calling a global function with example usage: params_to_vectors(params, tunables) and returns: vectors