docs: def _remove_duplicate_points(points, groups):
      ''' Removes the duplicate points from the beginning of a section,
      if they are present in points-groups representation.
  
      Returns:
          points, groups with unique points.
  
      '''
  
      group_initial_ids = groups[:, GPFIRST]
  
      to_be_reduced = np.zeros(len(group_initial_ids))
      to_be_removed = []
  
      for ig, g in enumerate(groups):
          iid, typ, pid = g[GPFIRST], g[GTYPE], g[GPID]
          # Remove first point from sections that are
          # not the root section, a soma, or a child of a soma
          if pid != -1 and typ != 1 and groups[pid][GTYPE] != 1:
              # Remove duplicate from list of points
              to_be_removed.append(iid)
              # Reduce the id of the following sections
              # in groups structure by one
              to_be_reduced[ig + 1:] += 1
  
      groups[:, GPFIRST] = groups[:, GPFIRST] - to_be_reduced
      points = np.delete(points, to_be_removed, axis=0)
  
      return points, groups