code: def is_nondominated_kung(self, obs_df):
          
  
          obj_df = obs_df.loc[:,self.obs_obj_names]
          obj_names = self.obs_obj_names
          ascending = False
          if self.obs_dict[obj_names[0]] == "min":
              ascending = True
  
          obj_df.sort_values(by=obj_names[0],ascending=ascending,inplace=True)
          P = list(obj_df.index)
  
          def front(p):
              if len(p) == 1:
                  return p
              p = list(obj_df.loc[p,:].sort_values(by=obj_names[0],ascending=ascending).index)
              half = int(len(p) / 2)
              T = front(p[:half])
              B = front(p[half:])
              M = []
              i = 0
              while i < len(B):
                  j = 0
                  while j < len(T):
                      #if dominates(T[j],B[i]):
                      if self.dominates(obj_df.loc[T[j],:], obj_df.loc[B[i],:]):
                          break
                      j += 1
                  if (j == len(T)):
                      M.append(B[i])
                  i += 1
              T.extend(M)
              return T
  
  
          PP = front(P)
          is_nondom = pd.Series(data=False,index=obs_df.index,dtype=bool)
          is_nondom.loc[PP] = True
          return is_nondom
docs: identify which candidate solutions are pareto non-dominated using Kungs algorithm
  
          Parameters
          ----------
          obs_df : pandas.DataFrame
              dataframe with columns of observation names and rows of realizations
  
          Returns
          -------
          is_dominated : pandas.Series
              series with index of obs_df and bool series