<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def format_sensor_bar(self, sensor):
 """ Build and format a sensor bar. If pango is enabled bar color is per sensor."""

        percentage = self.percentage(sensor.current, sensor.critical)
        bar = make_vertical_bar(int(percentage))
        if self.pango_enabled:
            if self.dynamic_color:
                color = self.colors[int(percentage)]
                return self.format_pango(color, bar)
        return bar