def rollback(*args, **kwargs):
action_files = MICRODROP_CONDA_ACTIONS.files()<EOL>if not action_files:<EOL><INDENT>logger.debug('<STR_LIT>')<EOL>revisions_js = ch.conda_exec('<STR_LIT:list>', '<STR_LIT>', '<STR_LIT>',<EOL>verbose=False)<EOL>revisions = json.loads(revisions_js)<EOL>return revisions[-<NUM_LIT:1>]['<STR_LIT>']<EOL><DEDENT>cre_rev = re.compile(r'<STR_LIT>')<EOL>action_file = sorted([(int(cre_rev.match(file_i.namebase).group('<STR_LIT>')),<EOL>file_i) for file_i in<EOL>action_files if cre_rev.match(file_i.namebase)],<EOL>reverse=True)[<NUM_LIT:0>]<EOL>if action_file.ext.lower() == '<STR_LIT>':<EOL><INDENT>with bz2.BZ2File(action_file, mode='<STR_LIT:r>') as input_:<EOL><INDENT>action = json.load(input_)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>with action_file.open('<STR_LIT:r>') as input_:<EOL><INDENT>action = json.load(input_)<EOL><DEDENT><DEDENT>rollback_revision = action['<STR_LIT>'][-<NUM_LIT:2>]<EOL>conda_args = (['<STR_LIT>', '<STR_LIT>'] + list(args) +<EOL>['<STR_LIT>', str(rollback_revision)])<EOL>install_log_js = ch.conda_exec(*conda_args, verbose=False)<EOL>install_log = json.loads(install_log_js.split('<STR_LIT:\x00>')[-<NUM_LIT:1>])<EOL>logger.debug('<STR_LIT>', rollback_revision)<EOL>return rollback_revision, install_log<EOL>
Restore previous revision of Conda environment according to most recent
action in :attr:`MICRODROP_CONDA_ACTIONS`.

.. versionchanged:: 0.18
    Add support for action revision files compressed using ``bz2``.

.. versionchanged:: 0.24
    Remove channels argument.  Use Conda channels as configured in Conda
    environment.

    Note that channels can still be explicitly set through :data:`*args`.

Parameters
----------
*args
    Extra arguments to pass to Conda ``install`` roll-back command.

Returns
-------
int, dict
    Revision after roll back and Conda installation log object (from JSON
    Conda install output).

See also
--------

`wheeler-microfluidics/microdrop#200 <https://github.com/wheeler-microfluidics/microdrop/issues/200>`