code: def validate_tol(rtol, atol, n):
      """Validate tolerance values."""
  
      if np.any(rtol < 100 * EPS):
          warn(
              "At least one element of `rtol` is too small. "
              f"Setting `rtol = np.maximum(rtol, {100 * EPS})`.",
              stacklevel=3,
          )
          rtol = np.maximum(rtol, 100 * EPS)
  
      atol = np.asarray(atol)
      if atol.ndim > 0 and atol.shape != (n,):
          raise ValueError("`atol` has wrong shape.")
  
      if np.any(atol < 0):
          raise ValueError("`atol` must be positive.")
  
      return rtol, atol
  
file_path: scipy/scipy/integrate/_ivp/common.py
imports: from itertools import groupby
  from warnings import warn
  import numpy
  from scipy.sparse import find, coo_matrix
label_desc: Use image node_id 4 for calling a global function with example usage: validate_tol(rtol, atol, n) and returns: rtol,  atol