code: func (ps *Store) Get(name, capability string, mode int) (plugingetter.CompatPlugin, error) {
  	// Lookup using new model.
  	if ps != nil {
  		p, err := ps.GetV2Plugin(name)
  		if err == nil {
  			if p.IsEnabled() {
  				fp, err := p.FilterByCap(capability)
  				if err != nil {
  					return nil, err
  				}
  				p.AddRefCount(mode)
  				return fp, nil
  			}
  
  			// Plugin was found but it is disabled, so we should not fall back to legacy plugins
  			// but we should error out right away
  			return nil, errDisabled(name)
  		}
  		if _, ok := errors.Cause(err).(errNotFound); !ok {
  			return nil, err
  		}
  	}
  
  	if !allowV1PluginsFallback {
  		return nil, errNotFound(name)
  	}
  
  	p, err := plugins.Get(name, capability)
  	if err == nil {
  		return p, nil
  	}
  	if errors.Cause(err) == plugins.ErrNotFound {
  		return nil, errNotFound(name)
  	}
  	return nil, errors.Wrap(errdefs.System(err), "legacy plugin")
  }
docs: // Get returns an enabled plugin matching the given name and capability.