substitute '%r' in string ' npgettext(%r, %r, %r,count) ' with message_context, result of the function join_tokens,
out . write ( ' npgettext(%r, %r, %r,count) ' % ( message_context , join_tokens ( singular , trimmed ) , join_tokens ( plural , trimmed ) ) )