code: def _plot_weights_motif(self, index, plot_type="motif_raw",
                              background_probs=DEFAULT_BASE_BACKGROUND,
                              ncol=1,
                              figsize=None):
          
  
          w_all = self.get_weights()
  
          if len(w_all) == 0:
              raise Exception("Layer needs to be initialized first")
          W = w_all[0]
          if index is None:
              index = np.arange(W.shape[2])
  
          if isinstance(index, int):
              index = [index]
          fig = plt.figure(figsize=figsize)
  
          if plot_type == "motif_pwm" and plot_type in self.AVAILABLE_PLOTS:
              arr = pssm_array2pwm_array(W, background_probs)
          elif plot_type == "motif_raw" and plot_type in self.AVAILABLE_PLOTS:
              arr = W
          elif plot_type == "motif_pwm_info" and plot_type in self.AVAILABLE_PLOTS:
              quasi_pwm = pssm_array2pwm_array(W, background_probs)
              arr = _pwm2pwm_info(quasi_pwm)
          else:
              raise ValueError("plot_type needs to be from {0}".format(self.AVAILABLE_PLOTS))
  
          fig = seqlogo_fig(arr, vocab=self.VOCAB_name, figsize=figsize, ncol=ncol, plot_name="filter: ")
          # fig.show()
          return fig
docs: Index can only be a single int