code: def compute(self, pairs, x, x_link=None):
          
          if not is_pandas_2d_multiindex(pairs):
              raise ValueError(
                  "expected pandas.MultiIndex with record pair indices "
                  "as first argument"
              )
  
          if not isinstance(x, pandas.DataFrame):
              raise ValueError("expected pandas.DataFrame as second argument")
  
          if x_link is not None and not isinstance(x_link, pandas.DataFrame):
              raise ValueError("expected pandas.DataFrame as third argument")
  
          labels_left = listify(self.labels_left, [])
          labels_right = listify(self.labels_right, [])
  
          if x_link is None:
              df_a = frame_indexing(x[labels_left + labels_right], pairs, 0)
              data1 = tuple([df_a[lbl] for lbl in listify(self.labels_left)])
              data2 = tuple([df_a[lbl] for lbl in listify(self.labels_right)])
          else:
              df_a = frame_indexing(x[labels_left], pairs, 0)
              data1 = tuple([df_a[lbl] for lbl in listify(self.labels_left)])
              df_b = frame_indexing(x_link[labels_right], pairs, 1)
              data2 = tuple([df_b[lbl] for lbl in listify(self.labels_right)])
  
          results = self._compute(data1, data2)
  
          return results
docs: Compare the records of each record pair.
  
          Calling this method starts the comparing of records.
  
          Parameters
          ----------
          pairs : pandas.MultiIndex
              A pandas MultiIndex with the record pairs to compare. The indices
              in the MultiIndex are indices of the DataFrame(s) to link.
          x : pandas.DataFrame
              The DataFrame to link. If `x_link` is given, the comparing is a
              linking problem. If `x_link` is not given, the problem is one of
              deduplication.
          x_link : pandas.DataFrame, optional
              The second DataFrame.
  
          Returns
          -------
          pandas.Series, pandas.DataFrame, numpy.ndarray
              The result of comparing record pairs (the features). Can be
              a tuple with multiple pandas.Series, pandas.DataFrame,
              numpy.ndarray objects.