@property
    def ansi_codes(self):

        if self.isreset:
            return [0]

        codes = []
        for attribute in self.attributes:
            if self.attributes[attribute]:
                codes.append(attributes_ansi[attribute])
            else:
                # Fixing bold inverse being 22 instead of 21 on some terminals:
                codes.append(attributes_ansi[attribute]
                        + 20 if attributes_ansi[attribute]!=1 else 22 )

        if self.fg:
            codes.extend(self.fg.ansi_codes)

        if self.bg:
            self.bg.fg = False
            codes.extend(self.bg.ansi_codes)

        return codes
Pass in the required arguments for a payload, the enc type and the cmd,
dataset/ETHPy150Open tomerfiliba/plumbum/plumbum/colorlib/styles.py/Style.ansi_codes--crossover with--dataset/ETHPy150Open saltstack/salt/salt/payload.py/format_payload