code: def optimize_layout_aligned_euclidean(
      head_embeddings,
      tail_embeddings,
      heads,
      tails,
      n_epochs,
      epochs_per_sample,
      regularisation_weights,
      relations,
      rng_state,
      a=1.576943460405378,
      b=0.8950608781227859,
      gamma=1.0,
      lambda_=5e-3,
      initial_alpha=1.0,
      negative_sample_rate=5.0,
      parallel=True,
      verbose=False,
      tqdm_kwds=None,
      move_other=False,
  ):
      dim = head_embeddings[0].shape[1]
      alpha = initial_alpha
  
      epochs_per_negative_sample = numba.typed.List.empty_list(
          numba.types.float32[::1]
      )
      epoch_of_next_negative_sample = numba.typed.List.empty_list(
          numba.types.float32[::1]
      )
      epoch_of_next_sample = numba.typed.List.empty_list(
          numba.types.float32[::1]
      )
  
      for m in range(len(heads)):
          epochs_per_negative_sample.append(
              epochs_per_sample[m].astype(np.float32)
              / negative_sample_rate
          )
          epoch_of_next_negative_sample.append(
              epochs_per_negative_sample[m].astype(np.float32)
          )
          epoch_of_next_sample.append(
              epochs_per_sample[m].astype(np.float32)
          )
  
      optimize_fn = numba.njit(
          _optimize_layout_aligned_euclidean_single_epoch,
          fastmath=True,
          parallel=parallel,
      )
  
      if tqdm_kwds is None:
          tqdm_kwds = {}
  
      if "disable" not in tqdm_kwds:
          tqdm_kwds["disable"] = not verbose
  
      for n in tqdm(range(n_epochs), **tqdm_kwds):
          optimize_fn(
              head_embeddings,
              tail_embeddings,
              heads,
              tails,
              epochs_per_sample,
              a,
              b,
              regularisation_weights,
              relations,
              rng_state,
              gamma,
              lambda_,
              dim,
              move_other,
              alpha,
              epochs_per_negative_sample,
              epoch_of_next_negative_sample,
              epoch_of_next_sample,
              n,
          )
  
          alpha = initial_alpha * (1.0 - (float(n) / float(n_epochs)))
  
      return head_embeddings
  
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 11 for calling a global function with example usage: optimize_layout_aligned_euclidean(head_embeddings, tail_embeddings, heads, tails, n_epochs, epochs_per_sample, regularisation_weights, relations, rng_state, a, b, gamma, lambda_, initial_alpha, negative_sample_rate, parallel, verbose, tqdm_kwds, move_other) and returns: head_embeddings