code: def _parse_values(
      values,
      parameter,
      samples=None,
      ids=None,
      link_field=None,
      ref=None,
      is_frames=False,
  ):
      if values is None:
          return None
  
      if etau.is_str(values) or isinstance(values, foe.ViewExpression):
          if samples is None:
              raise ValueError(
                  "You must provide `samples` in order to extract field values "
                  "for the `%s` parameter" % parameter
              )
  
          if ids is not None and not is_frames:
              values = samples._get_values_by_id(
                  values, ids, link_field=link_field
              )
          else:
              values = samples.values(values)
  
      if is_frames:
          values = [_unwind_values(v) for v in values]
      else:
          values = _unwind_values(values)
  
      if ref is not None:
          _validate_values(values, ref, parameter, is_frames=is_frames)
  
      return values
  
imports: import itertools
  import warnings
  import numpy
  import sklearn.linear_model
  import sklearn.metrics
  import eta.core.serial
  import eta.core.utils
  import fiftyone.core.expressions
  import fiftyone.core.labels
label_desc: Use image node_id 6 for calling a global function with example usage: _parse_values(values, parameter, samples, ids, link_field, ref, is_frames) and returns: values, None