code: def _compute(
      self, predictions, references, sample_weight=None, average=None
  ):
      if self.config_name == "multilabel":
          references = np.array(references)
          predictions = np.array(predictions)
          if not (references.ndim == 2 and predictions.ndim == 2):
              raise ValueError(
                  "For multi-label inputs, both references and predictions should be 2-dimensional"
              )
          matthews_corr = [
              matthews_corrcoef(
                  predictions[:, i],
                  references[:, i],
                  sample_weight=sample_weight,
              )
              for i in range(references.shape[1])
          ]
          if average == "macro":
              matthews_corr = np.mean(matthews_corr)
          elif average is not None:
              raise ValueError(
                  "Invalid `average`: expected `macro`, or None "
              )
      else:
          matthews_corr = float(
              matthews_corrcoef(
                  references, predictions, sample_weight=sample_weight
              )
          )
      return {"matthews_correlation": matthews_corr}
  
imports: import datasets
  import numpy
  from sklearn.metrics import matthews_corrcoef
  import evaluate
label_desc: Use image node_id 2 for calling the MatthewsCorrelation obj's underlying member method code with example usage: obj._compute(predictions, references, sample_weight, average) and returns: dict