def _save_action(extra_context=None):
<EOL>revisions_js = ch.conda_exec('<STR_LIT:list>', '<STR_LIT>', '<STR_LIT>',<EOL>verbose=False)<EOL>revisions = json.loads(revisions_js)<EOL>action = extra_context.copy() if extra_context else {}<EOL>action['<STR_LIT>'] = revisions<EOL>action_path = (MICRODROP_CONDA_ACTIONS<EOL>.joinpath('<STR_LIT>'.format(revisions[-<NUM_LIT:1>]['<STR_LIT>'])))<EOL>action_path.parent.makedirs_p()<EOL>with bz2.BZ2File(action_path, mode='<STR_LIT:w>') as output:<EOL><INDENT>json.dump(action, output, indent=<NUM_LIT:2>)<EOL><DEDENT>return action_path, action<EOL>
Save list of revisions revisions for active Conda environment.

.. versionchanged:: 0.18
    Compress action revision files using ``bz2`` to save disk space.

Parameters
----------
extra_context : dict, optional
    Extra content to store in stored action revision.

Returns
-------
path_helpers.path, dict
    Path to which action was written and action object, including list of
    revisions for active Conda environment.