code: def __getitem__(self, x, indexed=True):
      try:
          return self.cache[x]
      except KeyError:
          if indexed:
              self.index += 1
              xval = Vertex(
                  x,
                  bounds=self.bounds,
                  func=self.func,
                  func_args=self.func_args,
                  g_cons=self.g_cons,
                  g_cons_args=self.g_cons_args,
                  index=self.index,
              )
          else:
              xval = Vertex(
                  x,
                  bounds=self.bounds,
                  func=self.func,
                  func_args=self.func_args,
                  g_cons=self.g_cons,
                  g_cons_args=self.g_cons_args,
              )
  
          # logging.info("New generated vertex at x = {}".format(x))
          # NOTE: Surprisingly high performance increase if logging is commented out
          self.cache[x] = xval
  
          # TODO: Check
          if self.func is not None:
              if self.g_cons is not None:
                  if xval.feasible:
                      self.nfev += 1
                      self.size += 1
                  else:
                      self.size += 1
              else:
                  self.nfev += 1
                  self.size += 1
  
          return self.cache[x]
  
imports: import numpy
  import copy
label_desc: Use image node_id 2 for calling the VertexCache obj's underlying member method code with example usage: obj.__getitem__(x, indexed) and returns: self, self