code: func (mgr *mspManagerImpl) Setup(msps []MSP) error {
  	if mgr.up {
  		mspLogger.Infof("MSP manager already up")
  		return nil
  	}
  
  	mspLogger.Debugf("Setting up the MSP manager (%d msps)", len(msps))
  
  	// create the map that assigns MSP IDs to their manager instance - once
  	mgr.mspsMap = make(map[string]MSP)
  
  	// create the map that sorts MSPs by their provider types
  	mgr.mspsByProviders = make(map[ProviderType][]MSP)
  
  	for _, msp := range msps {
  		// add the MSP to the map of active MSPs
  		mspID, err := msp.GetIdentifier()
  		if err != nil {
  			return errors.WithMessage(err, "could not extract msp identifier")
  		}
  		mgr.mspsMap[mspID] = msp
  		providerType := msp.GetType()
  		mgr.mspsByProviders[providerType] = append(mgr.mspsByProviders[providerType], msp)
  	}
  
  	mgr.up = true
  
  	mspLogger.Debugf("MSP manager setup complete, setup %d msps", len(msps))
  
  	return nil
  }
docs: // Setup initializes the internal data structures of this manager and creates MSPs