class_docstr: Introduces a notion of *protected records* whose key/subkey contains substring
  "[owner:ssh-rsa ...]" with an RSA public key of the owner.
  
  If this validator is used, changes to such records always must be signed with
  the corresponding private key (so only the owner can change them).
class_docstr_tok: ["Introduces","a","notion","of","*","protected","records","*","whose","key\/subkey","contains","substring","''","[","owner",":","ssh-rsa","...","]","''","with","an","RSA","public","key","of","the","owner",".","If","this","validator","is","used",",","changes","to","such","records","always","must","be","signed","with","the","corresponding","private","key","(","so","only","the","owner","can","change","them",")","."]
code: def _serialize_record(self, record: DHTRecord) -> bytes:
      return MSGPackSerializer.dumps(dataclasses.astuple(record))
  
file_path: hivemind/hivemind/dht/crypto.py
imports: import dataclasses
  import re
  from typing import Optional
  from hivemind.dht.validation import DHTRecord, RecordValidatorBase
  from hivemind.utils import MSGPackSerializer, get_logger
  from hivemind.utils.crypto import RSAPrivateKey, RSAPublicKey
label_desc: Use image node_id 6 for calling the RSASignatureValidator obj's underlying member method code with example usage: obj._serialize_record(record) and returns: MSGPackSerializer