nl: substitute '%r' in string ' pgettext(%r, %r) ' with message_context and result of the function join_tokens,
code: out . write ( ' pgettext(%r, %r) ' % ( message_context , join_tokens ( singular , trimmed ) ) )