<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def pre(self, command, output_dir, kw):
 """ Prepare some context before install Added kwargs in ``kw`` will be accessible into paste template files """

        # Build a random secret_key
        chars = u'abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)'
        kw['secret_key'] = ''.join([ choice(chars) for i in range(50) ])

        # Paste version
        kw['epaster_template_name'] = u'emencia-paste-djangocms-3'
        kw['epaster_template_version'] = template_version