code: def try_convert(typ, value, name):
      if value is None:
          return None
      if isinstance(value, typ):
          return value
      try:
          return typ(value)
      except (TypeError, OverflowError, ValueError, ArithmeticError):
          raise InvalidArgument(
              "Cannot convert %s=%r of type %s to type %s"
              % (name, value, type(value).__name__, typ.__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 5 for calling a global function with example usage: try_convert(typ, value, name) and returns: None, value, typ