code: def serialize(self, pid, record, links_factory=None, **kwargs):
          
          data = self.serializer.serialize(pid, record, links_factory)
          source = self._get_source(data)
          style = CitationStylesStyle(validate=False, **self._get_args(**kwargs))
          bib = CitationStylesBibliography(style, source, formatter.plain)
          citation = Citation([CitationItem(pid.pid_value)])
          bib.register(citation)
  
          return self._clean_result(''.join(bib.bibliography()[0]))
docs: Serialize a single record.
  
          :param pid: Persistent identifier instance.
          :param record: Record instance.
          :param links_factory: Factory function for record links.