code: def estimate_pu_f1(s, prob_s_eq_1) -> float:
      """Computes Claesen's estimate of f1 in the pulearning setting.
  
      Parameters
      ----------
      s : iterable (list or np.ndarray)
        Binary label (whether each element is labeled or not) in pu learning.
  
      prob_s_eq_1 : iterable (list or np.ndarray)
        The probability, for each example, whether it has label=1 P(label=1|x)
  
      Output (float)
      ------
      Claesen's estimate for f1 in the pulearning setting."""
  
      pred = np.asarray(prob_s_eq_1) >= 0.5
      true_positives = sum(
          (np.asarray(s) == 1) & (np.asarray(pred) == 1)
      )
      all_positives = sum(s)
      recall = true_positives / float(all_positives)
      frac_positive = sum(pred) / float(len(s))
      return (
          recall**2 / (2.0 * frac_positive)
          if frac_positive != 0
          else np.nan
      )
  
imports: import warnings
  import numpy
  import pandas
  from typing import Union, Tuple
  from cleanlab.typing import DatasetLike, LabelLike
  from cleanlab.internal.validation import labels_to_array
  from cleanlab.internal.constants import FLOATING_POINT_COMPARISON, TINY_VALUE
label_desc: Use image node_id 9 for calling a global function with example usage: estimate_pu_f1(s, prob_s_eq_1) and returns: unknown