code: def _index_map(self, u, items):
      u = np.max((u, 0.0))
      u = np.min((u, 1.0))
      return int(np.floor((1 - np.finfo(float).eps) * u * float(items)))
  
imports: import os
  import sys
  import tempfile
  import pickle
  import numpy
  import numpy.random
  from .spearmint_pb2 import *
  from .Locker import *
  from .sobol_lib import *
  from .helpers import *
  import logging
label_desc: Use image node_id 4 for calling the GridMap obj's underlying member method code with example usage: obj._index_map(u, items) and returns: int