code: def serialize(self, pid, record, links_factory=None):
          
          return simpledc.tostring(
              self.transform_record(pid, record, links_factory))
docs: Serialize a single record and persistent identifier.
  
          :param pid: Persistent identifier instance.
          :param record: Record instance.
          :param links_factory: Factory function for record links.