code: def bitset(name, members, base=bases.BitSet, list=False, tuple=False):
      if not name:
          raise ValueError('empty bitset name: %r' % name)
      if not hasattr(members, '__getitem__') or not hasattr(members, '__len__'):
          raise ValueError('non-sequence bitset members: %r' % members)
      if not len(members):
          raise ValueError('less than one bitset member: %r' % (members,))
      if len(set(members)) != len(members):
          raise ValueError('bitset members contains duplicates: %r' % (members,))
      if not issubclass(base.__class__, meta.MemberBitsMeta):
          raise ValueError('base does not subclass bitset.bases: %r' % base)
      list = {False: None, True: series.List}.get(list, list)
      tuple = {False: None, True: series.Tuple}.get(tuple, tuple)
      return base._make_subclass(name, members, listcls=list, tuplecls=tuple)