code: def is_valid(cls, arg):
          
          if isinstance(arg, list):
              allInts = allStrings = True
              for elem in arg:
                  allInts = allInts and ((elem == 0) or (elem == 1))
                  allStrings = allStrings and elem in cls.bitNames
  
              if allInts or allStrings:
                  return True
          return False
docs: Return True if arg is valid value for the class.