<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _render_bar(self, bar, value, max_value, label_width, bar_width, **settings):
 """ Render single chart bar. """

        percent = value / max_value
        barstr = ""
        barstr += str(settings[self.SETTING_BAR_CHAR]) * int(bar_width * percent)
        s = {k: settings[k] for k in (self.SETTING_FLAG_PLAIN,)}
        s.update(settings[self.SETTING_BAR_FORMATING])
        barstr = self.fmt_text(barstr, **s)
        barstr += ' ' * int(bar_width - int(bar_width * percent))
        strptrn = "{:"+str(label_width)+"s} [{:s}]"
        return strptrn.format(bar.get('label'), barstr)