call the method self.compression_formats.keys, convert it to list, substitute it for cmp_fmts if cmp_fmt is None,
cmp_fmts = list ( self . compression_formats . keys ( ) ) if cmp_fmt is None else [ cmp_fmt ]