def load_pip_requirements(self, files_map=None, freeze=True):
        if files_map is None:
            files_map = self.default_pip_files
        for group, requirements_txt in files_map.items():
            path = Path(requirements_txt)
            if not path.exists() and group.lower() == "all" and freeze:
                cmd = envoy.run("pip freeze")
                self[group].loads(cmd.std_out)
            elif path.exists():
                self[group].load(path)
def select_backend(self, backend_id=None):
        """
        Selects the backend corresponding to backend_id.
        If backend_id is none, refreshes the current configuration panel.

        @param backend_id: the id of the backend to select
        """
        selection = self.get_selection()
        if backend_id in self.backendid_to_iter:
            backend_iter = self.backendid_to_iter[backend_id]
            if selection:
                selection.select_iter(backend_iter)
        else:
            if self._get_selected_path():
                # We just reselect the currently selected entry
                self.on_select_row()
            else:
                # If nothing is selected, we select the first entry
                if selection:
                    selection.select_path("0")
        self.dialog.on_backend_selected(self.get_selected_backend_id())