'If given flag(s) should generate output.'

def is_active(self, flag):

    if (not self.active):
        return 0
    if ((not flag) or (flag in self.active)):
        return 1
    elif (type(flag) in (type(()), type([]))):
        for s in flag:
            if (s in self.active):
                return 1
    return 0
