pub fn attributes_to_bytes(attributes: &Attributes) -> Vec<u8>