code: def calc_reach_dist_other_points(
      set_index: set,
      rev_neighborhoods: dict,
      reach_dist: dict,
      dist_dict: dict,
      k_dist: dict,
  ):
      """
      Calculate reachability distance from reverse neighbors of reverse neighbors ( RkNN(RkNN(NewPoints)) )
      to reverse neighbors ( RkNN(NewPoints) ). These values change due to the insertion of new points.
      """
      for j in set_index:
          for i in set(rev_neighborhoods[j]):
              reach_dist[i][j] = max(dist_dict[i][j], k_dist[j])
      return reach_dist
  
imports: from __future__ import annotations
  import copy
  import functools
  import pandas
  from river import anomaly, utils
  from river.neighbors.base import DistanceFunc
label_desc: Use image node_id 5 for calling a global function with example usage: calc_reach_dist_other_points(set_index, rev_neighborhoods, reach_dist, dist_dict, k_dist) and returns: reach_dist