code: def check_other_fairness_objects(fobject, other):
      """
      Checking compatibility of GroupFairnessClassification objects
      """
      for other_obj in other:
          if fobject.protected.shape != other_obj.protected.shape:
              raise FairnessObjectsDifferenceError(
                  "protected attributes have different shapes"
              )
  
          if any(fobject.protected != other_obj.protected):
              raise FairnessObjectsDifferenceError(
                  "protected attributes are not the same"
              )
  
          if fobject.privileged != other_obj.privileged:
              raise FairnessObjectsDifferenceError(
                  "privileged subgroups are not the same"
              )
  
          if fobject.y.shape != other_obj.y.shape:
              raise FairnessObjectsDifferenceError(
                  "target variable (y) has different shape among Fairness objects"
              )
  
          if any(fobject.y != other_obj.y):
              raise FairnessObjectsDifferenceError(
                  "target variable (y) is not the same among Fairness objects"
              )
  
          if fobject.epsilon != other_obj.epsilon:
              raise FairnessObjectsDifferenceError(
                  "epsilon value is not the same among Fairness objects"
              )
  
      # check uniqueness of label
      labels = [fobject.label]
      for other_obj in other:
          labels.append(other_obj.label)
  
      if len(labels) != len(set(labels)):
          raise FairnessObjectsDifferenceError(
              "Fairness labels are not unique and therefore objects cannot be plotted together"
          )
  
file_path: DALEX/python/dalex/dalex/fairness/_basics/checks.py
imports: import numpy
  import pandas
  from .exceptions import *
  from ..._explainer import helper
label_desc: Use image node_id 4 for calling a global function with example usage: check_other_fairness_objects(fobject, other) without return types