code: def _parse_pairwise_input(indices1, indices2, MDlogger, fname=''):
      r
  
      if is_iterable_of_int(indices1):
          MDlogger.warning('The 1D arrays input for %s have been sorted, and '
                           'index duplicates have been eliminated.\n'
                           'Check the output of describe() to see the actual order of the features' % fname)
  
          # Eliminate duplicates and sort
          indices1 = np.unique(indices1)
  
          # Intra-group distances
          if indices2 is None:
              atom_pairs = combinations(indices1, 2)
  
          # Inter-group distances
          elif is_iterable_of_int(indices2):
  
              # Eliminate duplicates and sort
              indices2 = np.unique(indices2)
  
              # Eliminate duplicates between indices1 and indices1
              uniqs = np.in1d(indices2, indices1, invert=True)
              indices2 = indices2[uniqs]
              atom_pairs = product(indices1, indices2)
  
      else:
          atom_pairs = indices1
  
      return atom_pairs
docs: r"""For input of pairwise type (distances, inverse distances, contacts) checks the
          type of input the user gave and reformats it so that :py:func:`DistanceFeature`,
          :py:func:`InverseDistanceFeature`, and ContactFeature can work.
  
          In case the input isn't already a list of distances, this function will:
              - sort the indices1 array
              - check for duplicates within the indices1 array
              - sort the indices2 array
              - check for duplicates within the indices2 array
              - check for duplicates between the indices1 and indices2 array
              - if indices2 is     None, produce a list of pairs of indices in indices1, or
              - if indices2 is not None, produce a list of pairs of (i,j) where i comes from indices1, and j from indices2