code: def _extract_missing(values):  # pragma: no cover
      """Extract missing values from `values`.
  
      Parameters
      ----------
      values: set
          Set of values to extract missing from.
  
      Returns
      -------
      output: set
          Set with missing values extracted.
  
      missing_values: MissingValues
          Object with missing value information.
      """
      missing_values_set = {
          value
          for value in values
          if value is None or is_scalar_nan(value)
      }
  
      if not missing_values_set:
          return values, MissingValues(nan=False, none=False)
  
      if None in missing_values_set:
          if len(missing_values_set) == 1:
              output_missing_values = MissingValues(
                  nan=False, none=True
              )
          else:
              # If there is more than one missing value, then it has to be
              # float('nan') or np.nan
              output_missing_values = MissingValues(nan=True, none=True)
      else:
          output_missing_values = MissingValues(nan=True, none=False)
  
      # create set without the missing values
      output = values - missing_values_set
      return output, output_missing_values
  
file_path: mars/mars/learn/utils/_encode.py
imports: import numpy
  from typing import NamedTuple
  from ...None import tensor, dataframe
  from .core import is_scalar_nan
label_desc: Use image node_id 2 for calling a global function with example usage: _extract_missing(values) and returns: output,  output_missing_values, values,  MissingValues