expands a compressed mac addres str ie (AC8674075628) to mac address (AC:86:74:07:56:28) also makes it lower/upper case

def mac_expand(cls, mac, upper=True, lower=False):
        """expands a compressed mac addres str ie (AC8674075628) to mac address (AC:86:74:07:56:28) also makes it lower/upper case"""
        mac = ":".join(["".join(i) for i in zip(mac[::2], mac[1::2])])
        return mac.upper() if upper else mac.lower() if lower else mac