code: def __run_batch_abs_metric(
      metric, X, y, model_generator, method_name, loss, num_fcounts
  ):
      def score_function(
          fcount,
          X_train,
          X_test,
          y_train,
          y_test,
          attr_function,
          trained_model,
      ):
          A_train = np.abs(__strip_list(attr_function(X_train)))
          nkeep_train = (np.ones(len(y_train)) * fcount).astype(int)
          # nkeep_train = np.minimum(nkeep_train, np.array(A_train > 0).sum(1)).astype(int)
          A_test = np.abs(__strip_list(attr_function(X_test)))
          nkeep_test = (np.ones(len(y_test)) * fcount).astype(int)
          # nkeep_test = np.minimum(nkeep_test, np.array(A_test >= 0).sum(1)).astype(int)
          return metric(
              nkeep_train,
              nkeep_test,
              X_train,
              y_train,
              X_test,
              y_test,
              A_train,
              A_test,
              model_generator,
              loss,
          )
  
      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 38 for calling a global function with example usage: __run_batch_abs_metric(metric, X, y, model_generator, method_name, loss, num_fcounts) and returns: fcounts,  __score_method, metric