code: def get_knot_idx_by_dist(num_of_obs, knot_distance):
      """function to calculate the knot idx based on num_of_obs and knot_distance."""
      # starts with the the ending point
      # use negative values or simply append 0 to the sequence?
      knot_idx = np.sort(np.arange(num_of_obs - 1, -1, -knot_distance))
      knot_idx = np.round(knot_idx).astype("int")
      if 0 not in knot_idx:
          # knot_idx = np.sort(np.arange(num_of_obs - 1, -1 - knot_distance, -knot_distance))
          knot_idx = np.sort(np.append(knot_idx, 0))
  
      return knot_idx
  
imports: import numpy
  import pandas
  from ..exceptions import IllegalArgument
label_desc: Use image node_id 3 for calling a global function with example usage: get_knot_idx_by_dist(num_of_obs, knot_distance) and returns: knot_idx