code: func (e *AzureMonitorDatasource) findClosestAllowedIntervalMS(intervalMs int64) int64 {
  	closest := allowedIntervalsMS[0]
  
  	for i, allowed := range allowedIntervalsMS {
  		if intervalMs > allowed {
  			if i+1 < len(allowedIntervalsMS) {
  				closest = allowedIntervalsMS[i+1]
  			} else {
  				closest = allowed
  			}
  		}
  	}
  	return closest
  }
docs: // findClosestAllowedIntervalMs is used for the auto time grain setting.
  // It finds the closest time grain from the list of allowed time grains for Azure Monitor
  // using the Grafana interval in milliseconds