def formatted_table_factory(format, label):

    @data_factory(label=label, identifier=lambda *a, **k: False)
    def factory(file, **kwargs):
        kwargs['format'] = 'ascii.%s' % format
        return astropy_tabular_data(file, **kwargs)

    # rename function to its variable reference below
    # allows pickling to work
    factory.__name__ = format % '%s_factory'

    return factory
dataset/ETHPy150Open glue-viz/glue/glue/core/data_factories/astropy_table.py/formatted_table_factory/swapped operands of `%`