code: def __run_measure(
      measure,
      X,
      y,
      model_generator,
      method_name,
      attribution_sign,
      num_fcounts,
      summary_function,
  ):
      def score_function(
          fcount,
          X_train,
          X_test,
          y_train,
          y_test,
          attr_function,
          trained_model,
          random_state,
      ):
          if attribution_sign == 0:
              A = np.abs(__strip_list(attr_function(X_test)))
          else:
              A = attribution_sign * __strip_list(attr_function(X_test))
          nmask = np.ones(len(y_test)) * fcount
          nmask = np.minimum(nmask, np.array(A >= 0).sum(1)).astype(int)
          return measure(
              nmask,
              X_train,
              y_train,
              X_test,
              y_test,
              A,
              model_generator,
              summary_function,
              trained_model,
              random_state,
          )
  
      fcounts = __intlogspace(0, X.shape[1], num_fcounts)
      return fcounts, __score_method(
          X, y, fcounts, model_generator, score_function, method_name
      )
  
imports: import hashlib
  import os
  import time
  import numpy
  import sklearn
  from ..None import __version__
  from .None import measures, methods
label_desc: Use image node_id 33 for calling a global function with example usage: __run_measure(measure, X, y, model_generator, method_name, attribution_sign, num_fcounts, summary_function) and returns: fcounts,  __score_method, measure