code: def load_channels(self, checked=False, test_name=None):
          
          chan_name = self.parent.labels.chan_name
  
          if self.filename is not None:
              filename = self.filename
          elif self.parent.info.filename is not None:
              filename = (splitext(self.parent.info.filename)[0] +
                          '_channels.json')
          else:
              filename = None
  
          if test_name is None:
              filename, _ = QFileDialog.getOpenFileName(self,
                                                        'Open Channels Montage',
                                                        filename,
                                                        'Channels File (*.json)')
          else:
              filename = test_name
  
          if filename == '':
              return
  
          self.filename = filename
          with open(filename, 'r') as outfile:
              groups = load(outfile)
  
          s_freq = self.parent.info.dataset.header['s_freq']
          no_in_dataset = []
          for one_grp in groups:
              no_in_dataset.extend(set(one_grp['chan_to_plot']) -
                                   set(chan_name))
              chan_to_plot = set(chan_name) & set(one_grp['chan_to_plot'])
              ref_chan = set(chan_name) & set(one_grp['ref_chan'])
  
              group = ChannelsGroup(chan_name, one_grp['name'], one_grp, s_freq)
              group.highlight_channels(group.idx_l0, chan_to_plot)
              group.highlight_channels(group.idx_l1, ref_chan)
              self.tabs.addTab(group, one_grp['name'])
  
          if no_in_dataset:
              msg = 'Channels not present in the dataset: ' + ', '.join(no_in_dataset)
              self.parent.statusBar().showMessage(msg)
              lg.debug(msg)
  
          self.apply()
docs: Load channel groups from file.
  
          Parameters
          ----------
          test_name : path to file
              when debugging the function, you can open a channels file from the
              command line