code: def check_valid_bound(value, name):
      """Checks that value is either unspecified, or a valid interval bound.
  
      Otherwise raises InvalidArgument.
      """
      if value is None or isinstance(
          value, integer_types + (Rational,)
      ):
          return
      if not isinstance(value, (Real, decimal.Decimal)):
          raise InvalidArgument(
              "%s=%r must be a real number." % (name, value)
          )
      if math.isnan(value):
          raise InvalidArgument(
              "Invalid end point %s=%r" % (name, value)
          )
  
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 3 for calling a global function with example usage: check_valid_bound(value, name) without return types