code: def check_type(typ, arg, name):
      if not isinstance(arg, typ):
          if isinstance(typ, tuple):
              assert (
                  len(typ) >= 2
              ), "Use bare type instead of len-1 tuple"
              typ_string = "one of " + ", ".join(
                  t.__name__ for t in typ
              )
          else:
              typ_string = typ.__name__
  
              if typ_string == "SearchStrategy":
                  from hypothesis.strategies import SearchStrategy
  
                  # Use hypothesis.strategies._internal.strategies.check_strategy
                  # instead, as it has some helpful "did you mean..." logic.
                  assert (
                      typ is not SearchStrategy
                  ), "use check_strategy instead"
  
          raise InvalidArgument(
              f"Expected {typ_string} but got {name}={arg!r} (type={type(arg).__name__})"
          )
  
file_path: catboost/contrib/python/hypothesis/py3/hypothesis/internal/validation.py
imports: import decimal
  import math
  from numbers import Rational, Real
  from hypothesis.errors import InvalidArgument
  from hypothesis.internal.coverage import check_function
label_desc: Use image node_id 1 for calling a global function with example usage: check_type(typ, arg, name) without return types