code: func (jlf *jsonLedgerFactory) GetOrCreate(chainID string) (blockledger.ReadWriter, error) {
  	jlf.mutex.Lock()
  	defer jlf.mutex.Unlock()
  
  	key := chainID
  
  	l, ok := jlf.ledgers[key]
  	if ok {
  		return l, nil
  	}
  
  	directory := filepath.Join(jlf.directory, fmt.Sprintf(chainDirectoryFormatString, chainID))
  
  	logger.Debugf("Initializing chain %s at: %s", chainID, directory)
  
  	if err := os.MkdirAll(directory, 0700); err != nil {
  		logger.Errorf("Error initializing channel %s: %s", chainID, err)
  		return nil, errors.Wrapf(err, "error initializing channel %s", chainID)
  	}
  
  	ch := newChain(directory)
  	jlf.ledgers[key] = ch
  	return ch, nil
  }
docs: // GetOrCreate gets an existing ledger (if it exists) or creates it if it does not