code: def check_sample(values, strategy_name):
      if "numpy" in sys.modules and isinstance(
          values, sys.modules["numpy"].ndarray
      ):
          if values.ndim != 1:
              raise InvalidArgument(
                  (
                      "Only one-dimensional arrays are supported for sampling, "
                      "and the given value has {ndim} dimensions (shape "
                      "{shape}).  This array would give samples of array slices "
                      "instead of elements!  Use np.ravel(values) to convert "
                      "to a one-dimensional array, or tuple(values) if you "
                      "want to sample slices."
                  ).format(ndim=values.ndim, shape=values.shape)
              )
      elif not isinstance(
          values, (OrderedDict, abc.Sequence, enum.EnumMeta)
      ):
          raise InvalidArgument(
              "Cannot sample from {values}, not an ordered collection. "
              "Hypothesis goes to some length to ensure that the {strategy} "
              "strategy has stable results between runs. To replay a saved "
              "example, the sampled values must have the same iteration order "
              "on every run - ruling out sets, dicts, etc due to hash "
              "randomisation. Most cases can simply use `sorted(values)`, but "
              "mixed types or special values such as math.nan require careful "
              "handling - and note that when simplifying an example, "
              "Hypothesis treats earlier values as simpler.".format(
                  values=repr(values), strategy=strategy_name
              )
          )
      return tuple(values)
  
imports: from __future__ import absolute_import, division, print_function
  import enum
  import hashlib
  import heapq
  import sys
  from collections import OrderedDict
  from fractions import Fraction
  from hypothesis.errors import InvalidArgument
  from hypothesis.internal.compat import abc, bit_length, floor, hrange, int_from_bytes, qualname, str_to_bytes
  from hypothesis.internal.floats import int_to_float
label_desc: Use image node_id 5 for calling a global function with example usage: check_sample(values, strategy_name) and returns: tuple