code: def _check_missing(truth, missing):
      """
      Check for missing truth values.
  
      Args:
          truth: the series of truth values
          missing: what to do with missing values
      """
      if missing == "error" and truth.isna().any():
          nmissing = truth.isna().sum()
          raise ValueError(
              "missing truth for {} predictions".format(nmissing)
          )
  
imports: import numpy
  import pandas
label_desc: Use image node_id 1 for calling a global function with example usage: _check_missing(truth, missing) without return types