def METHOD_NAME(state: State, header_hash: bytes):
    try:
        data = state._db.get_raw(b'metadata_' + header_hash)
        return BlockMetadata.deserialize(data)
    except KeyError:
        logger.debug('[get_block_metadata] Block header_hash %s not found',
                     b'metadata_' + bin2hstr(header_hash).encode())
    except Exception as e:
        logger.error('[get_block_metadata] %s', e)
    return None