def format_header_footer(self, c):
        height, width = self.window_size()

        # Get values for labels
        l = getattr(self, c.label_left.name) if c.label_left.name != None else ''
        r = getattr(self, c.label_right.name) if c.label_right.name != None else ''
        p = c.pad
        llen = len(l)
        rlen = len(r)

        # Add colour
        l = self.colour(l, c.label_left.colour, c.label_left.bg_colour, c.label_left.attrs)
        r = self.colour(r, c.label_right.colour, c.label_right.bg_colour, c.label_right.attrs)
        p = self.colour(p, c.colour, c.bg_colour, c.attrs)

        # Build
        data = l + (width - llen - rlen)*p + r

        return data
dataset/ETHPy150Open snare/voltron/voltron/view.py/TerminalView.format_header_footer/original