code: def check_clusterings(labels_true, labels_pred):
      """Check that the two clusterings matching 1D integer arrays."""
      labels_true = np.asarray(labels_true)
      labels_pred = np.asarray(labels_pred)
  
      # input checks
      if labels_true.ndim != 1:
          raise ValueError(
              "labels_true must be 1D: shape is %r"
              % (labels_true.shape,)
          )
      if labels_pred.ndim != 1:
          raise ValueError(
              "labels_pred must be 1D: shape is %r"
              % (labels_pred.shape,)
          )
      if labels_true.shape != labels_pred.shape:
          raise ValueError(
              "labels_true and labels_pred must have same size, got %d and %d"
              % (labels_true.shape[0], labels_pred.shape[0])
          )
      return labels_true, labels_pred
  
imports: from __future__ import division
  from math import log
  import numpy
  from scipy.misc import comb
  from scipy import sparse
  from .expected_mutual_info_fast import expected_mutual_information
  from ...utils.fixes import bincount
  from ...utils.validation import check_array
label_desc: Use image node_id 2 for calling a global function with example usage: check_clusterings(labels_true, labels_pred) and returns: labels_true,  labels_pred