code: def _check_radians(value, max_radians=2 * np.pi):
      
      try:
          value = value.to('radians').m
      except AttributeError:
          pass
      if np.greater(np.nanmax(np.abs(value)), max_radians):
          warnings.warn('Input over {} radians. '
                        'Ensure proper units are given.'.format(max_radians))
      return value
docs: Input validation of values that could be in degrees instead of radians.
  
      Parameters
      ----------
      value : `pint.Quantity`
          The input value to check.
  
      max_radians : float
          Maximum absolute value of radians before warning.
  
      Returns
      -------
      `pint.Quantity`
          The input value