<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def draw(self, **kwargs):
 """ Called from the fit method, this method creates the canvas and draws the part-of-speech tag mapping as a bar chart. Parameters kwargs: dict generic keyword arguments. Returns ------- ax : matplotlib axes Axes on which the PosTagVisualizer was drawn. """

        colors = resolve_colors(
            n_colors=len(self.pos_tag_counts_),
            colormap=self.colormap,
            colors=self.colors,
        )

        if self.frequency:
            # Sort tags with respect to frequency in corpus
            sorted_tags = sorted(
                self.pos_tag_counts_, key=self.pos_tag_counts_.get, reverse=True
            )
            sorted_counts = [self.pos_tag_counts_[tag] for tag in sorted_tags]

            self.ax.bar(range(len(sorted_tags)), sorted_counts, color=colors)
            return self.ax

        self.ax.bar(
            range(len(self.pos_tag_counts_)),
            list(self.pos_tag_counts_.values()),
            color=colors,
        )
        return self.ax