code: def check_valid_magnitude(value, name):
      """Checks that value is either unspecified, or a non-negative valid
      interval bound.
  
      Otherwise raises InvalidArgument.
      """
      check_valid_bound(value, name)
      if value is not None and value < 0:
          raise InvalidArgument(
              f"{name}={value!r} must not be negative."
          )
      elif value is None and name == "min_magnitude":
          raise InvalidArgument(
              "Use min_magnitude=0 or omit the argument entirely."
          )
  
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 4 for calling a global function with example usage: check_valid_magnitude(value, name) without return types