code: def _validate_int(n, bound, name):
      msg = f"{name} must be an integer not less than {bound}, but got {n!r}"
      try:
          n = operator.index(n)
      except TypeError:
          raise TypeError(msg) from None
      if n < bound:
          raise ValueError(msg)
      return n
  
file_path: scipy/scipy/stats/_relative_risk.py
imports: import operator
  from dataclasses import dataclass
  import numpy
  from scipy.special import ndtri
  from ._common import ConfidenceInterval
label_desc: Use image node_id 1 for calling a global function with example usage: _validate_int(n, bound, name) and returns: n