code: def _optimize_layout_euclidean_densmap_epoch_init(
      head_embedding,
      tail_embedding,
      head,
      tail,
      a,
      b,
      re_sum,
      phi_sum,
  ):
      re_sum.fill(0)
      phi_sum.fill(0)
  
      for i in numba.prange(head.size):
          j = head[i]
          k = tail[i]
  
          current = head_embedding[j]
          other = tail_embedding[k]
          dist_squared = rdist(current, other)
  
          phi = 1.0 / (1.0 + a * pow(dist_squared, b))
  
          re_sum[j] += phi * dist_squared
          re_sum[k] += phi * dist_squared
          phi_sum[j] += phi
          phi_sum[k] += phi
  
      epsilon = 1e-8
      for i in range(re_sum.size):
          re_sum[i] = np.log(epsilon + (re_sum[i] / phi_sum[i]))
  
file_path: umap/umap/layouts.py
imports: import numpy
  import numba
  import umap.distances
  from umap.utils import tau_rand_int
  from tqdm.auto import tqdm
label_desc: Use image node_id 4 for calling a global function with example usage: _optimize_layout_euclidean_densmap_epoch_init(head_embedding, tail_embedding, head, tail, a, b, re_sum, phi_sum) without return types