You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: update.rs
    path of file: ./repos/bee/bee-storage/bee-storage-rocksdb/src/access
    
    the code of the file until where you have to start completion: // Copyright 2020-2022 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

use bee_block::BlockId;
use bee_
    
    fn update(&self, block_id: &BlockId, mut f: impl FnMut(&mut BlockMetadata)) -> Result<(), Self::Error> {
        let cf_handle = self.cf_handle(CF_BLOCK_ID_TO_METADATA)?;

        let guard = self.locks.block_id_to_metadata.write();

        if let Some(v) = self.inner.get_pinned_cf(cf_handle, block_id)? {
            // Unpacking from storage is fine.
            let mut metadata = BlockMetadata::unpack_unverified(&*v).unwrap();

            f(&mut metadata);

            self.inner.put_cf(cf_handle, block_id, metadata.pack_to_vec())?;
        }

        drop(guard);

        Ok(())
    }