code: func (ra *RegistrationAuthorityImpl) checkRegistrationIPLimit(
  	ctx context.Context,
  	limit ratelimit.RateLimitPolicy,
  	ip net.IP,
  	counter registrationCounter) error {
  
  	if !limit.Enabled() {
  		return nil
  	}
  
  	now := ra.clk.Now()
  	windowBegin := limit.WindowBegin(now)
  	count, err := counter(ctx, ip, windowBegin, now)
  	if err != nil {
  		return err
  	}
  
  	if count >= limit.GetThreshold(ip.String(), noRegistrationID) {
  		return berrors.RateLimitError("too many registrations for this IP")
  	}
  
  	return nil
  }
docs: // checkRegistrationIPLimit checks a specific registraton limit by using the
  // provided registrationCounter function to determine if the limit has been
  // exceeded for a given IP or IP range