def choose_new_data_viewer(self, data=None):

        from glue.config import qt_client

        if data and data.ndim == 1 and ScatterWidget in qt_client.members:
            default = qt_client.members.index(ScatterWidget)
        elif data and data.ndim > 1 and ImageWidget in qt_client.members:
            default = qt_client.members.index(ImageWidget)
        else:
            default = 0

        client = pick_class(list(qt_client.members), title='Data Viewer',
                            label="Choose a new data viewer",
                            default=default, sort=True)

        cmd = command.NewDataViewer(viewer=client, data=data)
        return self.do(cmd)
Bind the file-related modules to the :py:class:`pyfakefs` fake file
dataset/ETHPy150Open glue-viz/glue/glue/app/qt/application.py/GlueApplication.choose_new_data_viewer--crossover with--dataset/ETHPy150Open jmcgeheeiv/pyfakefs/pyfakefs/fake_filesystem_unittest.py/TestCase.setUpPyfakefs