code: def check_sample(
      values: Union[Type[enum.Enum], Sequence[T]], strategy_name: str
  ) -> Sequence[T]:
      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, "
                  f"and the given value has {values.ndim} dimensions (shape "
                  f"{values.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."
              )
      elif not isinstance(
          values, (OrderedDict, abc.Sequence, enum.EnumMeta)
      ):
          raise InvalidArgument(
              f"Cannot sample from {values!r}, not an ordered collection. "
              f"Hypothesis goes to some length to ensure that the {strategy_name} "
              "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 "
              "randomization. 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."
          )
      if isinstance(values, range):
          return values
      return tuple(values)
  
imports: import enum
  import hashlib
  import heapq
  import sys
  from collections import OrderedDict, abc
  from functools import lru_cache
  from typing import TYPE_CHECKING, List, Optional, Sequence, Tuple, Type, TypeVar, Union
  from hypothesis.errors import InvalidArgument
  from hypothesis.internal.compat import int_from_bytes
  from hypothesis.internal.floats import next_up
label_desc: Use image node_id 4 for calling a global function with example usage: check_sample(values, strategy_name) and returns: tuple, values