code: def _to_binary_scores(y, confs, pos_label):
      scores = []
      for yi, conf in zip(y, confs):
          if conf is None:
              conf = 0.0
  
          score = conf if yi == pos_label else 1.0 - conf
          scores.append(score)
  
      return scores
  
imports: from copy import deepcopy
  import inspect
  import itertools
  import warnings
  import numpy
  import sklearn.metrics
  import eta.core.utils
  import fiftyone
  import fiftyone.core.evaluation
  from fiftyone.core.expressions import ViewField
  import fiftyone.core.fields
  import fiftyone.core.labels
  import fiftyone.core.plots
  import fiftyone.core.utils
  import fiftyone.core.validation
  from .base import BaseEvaluationResults
label_desc: Use image node_id 4 for calling a global function with example usage: _to_binary_scores(y, confs, pos_label) and returns: scores