docs: def random_init_map(interface, state, label, inp):
      """Assign datapoint `e` randomly to one of the `k` clusters."""
      import random
      out = interface.output(0)
      centers = {}
  
      for row in inp:
          row = row.strip().split(state["delimiter"])
          if len(row) > 1:
              x = [(0 if row[i] in state["missing_vals"] else float(row[i])) for i in state["X_indices"]]
              cluster = random.randint(0, state['k'] - 1)
              vertex = state['create'](x, 1.0)
              centers[cluster] = vertex if cluster not in centers else state["update"](centers[cluster], vertex)
      for cluster, values in centers.iteritems():
          out.add(cluster, values)