def _as_bibtex(self, proto_document):
    kind = proto_document['type'].upper()
    fields = proto_document['fields']
    external_key = fields['external_key']
    del fields['external_key']
    key_value = []
    for (key, value) in fields.items():
        key_value.append(f'{key}={value}')
    bibtex = ((((f'@{kind}' + '{') + f'''{external_key},
''') + ',\n'.join(key_value)) + '\n}')
    return bibtex
def _as_bibtex(self, proto_document):
    kind = proto_document['type'].upper()
    fields = proto_document['fields']
    external_key = fields['external_key']
    del fields['external_key']
    key_value = []
    for (key, value) in fields.items():
        key_value.append(f'{key}={value}')
    bibtex = ((((f'@{kind}' + '{') + f'{external_key},
') + ',\n'.join(key_value)) + '\n}')
    return bibtex