code: def _validate_values(values, ref, values_type, is_frames=False):
      if not is_frames:
          if len(values) != len(ref):
              raise ValueError(
                  "Inconsistent number of %s (%d != %d). You may have missing "
                  "data/labels that you need to omit from your view"
                  % (values_type, len(values), len(ref))
              )
  
          return
  
      if len(values) != len(ref):
          raise ValueError(
              "Inconsistent number of %s traces (%d != %d). You may have "
              "missing data/labels that you need to omit from your view"
              % (values_type, len(values), len(ref))
          )
  
      for idx, (_values, _ref) in enumerate(zip(values, ref), 1):
          if len(_values) != len(_ref):
              raise ValueError(
                  "Inconsistent number of %s (%d != %d) in trace %d/%d. You may "
                  "have missing data/labels that you need to omit from your view"
                  % (
                      values_type,
                      len(_values),
                      len(_ref),
                      idx,
                      len(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 9 for calling a global function with example usage: _validate_values(values, ref, values_type, is_frames) without return types