code: def check_type(typ, arg, name=""):
      if name:
          name += "="
      if not isinstance(arg, typ):
          if isinstance(typ, tuple) and len(typ) == 1:
              typ = typ[0]
          if isinstance(typ, tuple):
              typ_string = "one of %s" % (
                  ", ".join(t.__name__ for t in typ)
              )
          else:
              typ_string = typ.__name__
          raise InvalidArgument(
              "Expected %s but got %s%r (type=%s)"
              % (typ_string, name, arg, type(arg).__name__)
          )
  
file_path: catboost/contrib/python/hypothesis/py2/hypothesis/internal/validation.py
imports: from __future__ import absolute_import, division, print_function
  import decimal
  import math
  from numbers import Rational, Real
  from hypothesis.errors import InvalidArgument
  from hypothesis.internal.compat import integer_types
  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