code: def _EStep(x, centers):
      """Computation of the input-to-cluster assignment
  
      Parameters
      ----------
      x array of shape (n,p)
        n = number of items, p = data dimension
      centers, array of shape (k,p) the cluster centers
  
      Returns
      -------
      z vector of shape(n), the resulting assignment
      """
      nbitem = x.shape[0]
      z = -np.ones(nbitem).astype(np.int_)
      mindist = np.inf * np.ones(nbitem)
      k = centers.shape[0]
      for q in range(k):
          dist = np.sum((x - centers[q]) ** 2, 1)
          z[dist < mindist] = q
          mindist = np.minimum(dist, mindist)
      J = mindist.sum()
      return z, J
  
imports: import numpy
label_desc: Use image node_id 3 for calling a global function with example usage: _EStep(x, centers) and returns: z,  J