code: def init_from_existing_internal(
      previous_embedding,
      weights_indptr,
      weights_indices,
      weights_data,
      relation_dict,
  ):
      n_samples = weights_indptr.shape[0] - 1
      n_features = previous_embedding.shape[1]
      result = np.zeros((n_samples, n_features), dtype=np.float32)
  
      for i in range(n_samples):
          if i in relation_dict:
              result[i] = previous_embedding[relation_dict[i]]
          else:
              normalisation = 0.0
              for idx in range(
                  weights_indptr[i], weights_indptr[i + 1]
              ):
                  j = weights_indices[idx]
                  if j in relation_dict:
                      normalisation += weights_data[idx]
                      result[i] += (
                          weights_data[idx]
                          * previous_embedding[relation_dict[j]]
                      )
              if normalisation == 0:
                  result[i] = np.random.uniform(-10.0, 10.0, n_features)
              else:
                  result[i] /= normalisation
  
      return result
  
imports: import numpy
  import numba
  from sklearn.base import BaseEstimator
  from sklearn.utils import check_array
  from umap.sparse import arr_intersect
  from umap.sparse import arr_union
  from umap.umap_ import UMAP, make_epochs_per_sample
  from umap.spectral import spectral_layout
  from umap.layouts import optimize_layout_aligned_euclidean
label_desc: Use image node_id 8 for calling a global function with example usage: init_from_existing_internal(previous_embedding, weights_indptr, weights_indices, weights_data, relation_dict) and returns: result