code: func (ls *LocalStore) Put(ctx context.Context, chunk Chunk) error {
  	if !ls.isValid(chunk) {
  		return ErrChunkInvalid
  	}
  
  	log.Trace("localstore.put", "key", chunk.Address())
  	ls.mu.Lock()
  	defer ls.mu.Unlock()
  
  	_, err := ls.memStore.Get(ctx, chunk.Address())
  	if err == nil {
  		return nil
  	}
  	if err != nil && err != ErrChunkNotFound {
  		return err
  	}
  	ls.memStore.Put(ctx, chunk)
  	err = ls.DbStore.Put(ctx, chunk)
  	return err
  }
docs: // Put is responsible for doing validation and storage of the chunk
  // by using configured ChunkValidators, MemStore and LDBStore.
  // If the chunk is not valid, its GetErrored function will
  // return ErrChunkInvalid.
  // This method will check if the chunk is already in the MemStore
  // and it will return it if it is. If there is an error from
  // the MemStore.Get, it will be returned by calling GetErrored
  // on the chunk.
  // This method is responsible for closing Chunk.ReqC channel
  // when the chunk is stored in memstore.
  // After the LDBStore.Put, it is ensured that the MemStore
  // contains the chunk with the same data, but nil ReqC channel.