code: def postag(
      X,
      y=None,
      ax=None,
      tagset="penn_treebank",
      colormap=None,
      colors=None,
      frequency=False,
      stack=False,
      parser=None,
      show=True,
      **kwargs,
  ):
      """
      Display a barchart with the counts of different parts of speech
      in X, which consists of a part-of-speech-tagged corpus, which the
      visualizer expects to be a list of lists of lists of (token, tag)
      tuples.
  
      Parameters
      ----------
      X : list or generator
          Should be provided as a list of documents or a generator
          that yields a list of documents that contain a list of
          sentences that contain (token, tag) tuples.
  
      y : ndarray or Series of length n
          An optional array of target values that are ignored by the
          visualizer.
  
      ax : matplotlib axes
          The axes to plot the figure on.
  
      tagset: string
          The tagset that was used to perform part-of-speech tagging.
          Either "penn_treebank" or "universal", defaults to "penn_treebank".
          Use "universal" if corpus has been tagged using SpaCy.
  
      colors : list or tuple of colors
          Specify the colors for each individual part-of-speech.
  
      colormap : string or matplotlib cmap
          Specify a colormap to color the parts-of-speech.
  
      frequency: bool {True, False}, default: False
          If set to True, part-of-speech tags will be plotted according to frequency,
          from most to least frequent.
  
      stack : bool {True, False}, default : False
          Plot the PosTag frequency chart as a per-class stacked bar chart.
          Note that fit() requires y for this visualization.
  
      parser : string or None, default: None
          If set to a string, string must be in the form of 'parser_tagger' or 'parser'
          to use defaults (for spacy this is 'en_core_web_sm', for nltk this is 'word').
          The 'parser' argument is one of the accepted parsing libraries. Currently
          'nltk' and 'spacy' are the only accepted libraries. NLTK or SpaCy must be
          installed into your environment. 'tagger' is the tagset to use. For example
          'nltk_wordpunct' would use the NLTK library with 'wordpunct' tagset. Or
          'spacy_en_core_web_sm' would use SpaCy with the 'en_core_web_sm' tagset.
  
      show: bool, default: True
          If True, calls ``show()``, which in turn calls ``plt.show()`` however you cannot
          call ``plt.savefig`` from this signature, nor ``clear_figure``. If False, simply
          calls ``finalize()``
  
      kwargs : dict
          Pass any additional keyword arguments to the PosTagVisualizer.
  
      Returns
      -------
      visualizer: PosTagVisualizer
          Returns the fitted, finalized visualizer
      """
      # Instantiate the visualizer
      visualizer = PosTagVisualizer(
          ax=ax,
          tagset=tagset,
          colors=colors,
          colormap=colormap,
          frequency=frequency,
          stack=stack,
          parser=parser,
          **kwargs,
      )
  
      # Fit and transform the visualizer (calls draw)
      visualizer.fit(X, y=y, **kwargs)
  
      if show:
          visualizer.show()
      else:
          visualizer.finalize()
  
      # Return the visualizer object
      return visualizer
  
imports: import numpy
  import importlib
  from yellowbrick.draw import bar_stack
  from yellowbrick.text.base import TextVisualizer
  from yellowbrick.style.colors import resolve_colors
  from yellowbrick.exceptions import YellowbrickValueError
label_desc: Use image node_id 1 for calling a global function with example usage: postag(X, y, ax, tagset, colormap, colors, frequency, stack, parser, show) and returns: visualizer