code: def get_plot_dims(signal, ann_samp):
      "Figure out the number of plot channels"
      if signal is not None:
          if signal.ndim == 1:
              sig_len = len(signal)
              n_sig = 1
          else:
              sig_len = signal.shape[0]
              n_sig = signal.shape[1]
      else:
          sig_len = 0
          n_sig = 0
  
      if ann_samp is not None:
          n_annot = len(ann_samp)
      else:
          n_annot = 0
  
      return sig_len, n_sig, n_annot, max(n_sig, n_annotf get_plot_dims(signal, ann_samp):
      "Figure out the number of plot channels"
      if signal is not None:
          if signal.ndim == 1:
              sig_len = len(signal)
              n_sig = 1
          else:
              sig_len = signal.shape[0]
              n_sig = signal.shape[1]
      else:
          sig_len = 0
          n_sig = 0
  
      if ann_samp is not None:
          n_annot = len(ann_samp)
      else:
          n_annot = 0
  
      return sig_len, n_sig, n_annot, max(n_sig, n_annot)
docs: Figure out the number of plot channels