def register_archive_format(name, function, extra_args=None, description='<STR_LIT>'):
if extra_args is None:<EOL><INDENT>extra_args = []<EOL><DEDENT>if not isinstance(function, collections.Callable):<EOL><INDENT>raise TypeError('<STR_LIT>' % function)<EOL><DEDENT>if not isinstance(extra_args, (tuple, list)):<EOL><INDENT>raise TypeError('<STR_LIT>')<EOL><DEDENT>for element in extra_args:<EOL><INDENT>if not isinstance(element, (tuple, list)) or len(element) !=<NUM_LIT:2>:<EOL><INDENT>raise TypeError('<STR_LIT>')<EOL><DEDENT><DEDENT>_ARCHIVE_FORMATS[name] = (function, extra_args, description)<EOL>
Registers an archive format.

    name is the name of the format. function is the callable that will be
    used to create archives. If provided, extra_args is a sequence of
    (name, value) tuples that will be passed as arguments to the callable.
    description can be provided to describe the format, and will be returned
    by the get_archive_formats() function.