code: def split_into_normal_and_reciprocal(self, pad=False,
                                           return_indices=False):
          configs = np.hstack((np.sort(self.configs[:, 0:2], axis=1),
                               np.sort(self.configs[:, 2:4], axis=1)))
          ab_min = configs[:, 0]
          mn_min = configs[:, 2]
          indices_normal = np.where(ab_min < mn_min)[0]
          indices_used = []
          normal = []
          normal_indices = []
          reciprocal_indices = []
          reciprocal = []
          duplicates = []
          for index in indices_normal:
              indices_used.append(index)
              normal.append(self.configs[index, :])
              normal_indices.append(index)
              index_rec = np.where(
                  (configs[:, 0] == configs[index, 2]) &
                  (configs[:, 1] == configs[index, 3]) &
                  (configs[:, 2] == configs[index, 0]) &
                  (configs[:, 3] == configs[index, 1]))[0]
              if len(index_rec) == 0 and pad:
                  reciprocal.append(np.ones(4) * np.nan)
              elif len(index_rec) == 1:
                  reciprocal.append(self.configs[index_rec[0], :])
                  indices_used.append(index_rec[0])
                  reciprocal_indices.append(index_rec[0])
              elif len(index_rec > 1):
                  reciprocal.append(self.configs[index_rec[0], :])
                  reciprocal_indices.append(index_rec[0])
                  duplicates += list(index_rec[1:])
                  indices_used += list(index_rec)
          set_all_indices = set(list(range(0, configs.shape[0])))
          set_used_indices = set(indices_used)
          reciprocal_only_indices = set_all_indices - set_used_indices
          for index in reciprocal_only_indices:
              if pad:
                  normal.append(np.ones(4) * np.nan)
              reciprocal.append(self.configs[index, :])
          normals = np.array(normal)
          reciprocals = np.array(reciprocal)
          if return_indices:
              return normals, reciprocals, normal_indices, reciprocal_indices
          else:
              return normals, reciprocals