code: func (d *DedupManager) IsLeader(tmpl *template.Template) bool {
  	d.leaderLock.RLock()
  	defer d.leaderLock.RUnlock()
  
  	lockCh, ok := d.leader[tmpl]
  	if !ok {
  		return false
  	}
  	select {
  	case <-lockCh:
  		return false
  	default:
  		return true
  	}
  }
docs: // IsLeader checks if we are currently the leader instance