code: def score_fn(
      mask: np.ndarray,
      tr_err: float,
      object_size: float,
      threshold: float = 0.75,
      lbd: float = 5,
  ):
      """
      Mask scoring function.
  
      :param mask: The mask.
      :param tr_err: The error in transform-robustness.
      :param object_size: The size of the object.
      :param threshold: The threshold at which to heavily penalize.
      :param lbd: lambda weight multiplier.
      :return: Score of the mask.
      """
      if tr_err > threshold:
          return 10000000
  
      return lbd * mask.sum() / 3 / (object_size) + tr_err
  
imports: from typing import Optional, Tuple, Union, TYPE_CHECKING, List
  import math
  import numpy
  from art.estimators.estimator import BaseEstimator
  from art.estimators.classification import ClassifierMixin
  from art.utils import get_labels_np_array
label_desc: Use image node_id 14 for calling a global function with example usage: score_fn(mask, tr_err, object_size, threshold, lbd) and returns: unknown, int