code: def boolmask(indices, maxval=None):
      
      if maxval is None:
          indices = list(indices)
          maxval = max(indices) + 1
      mask = [False] * maxval
      for index in indices:
          mask[index] = True
      return mask
docs: Constructs a list of booleans where an item is True if its position is in
      `indices` otherwise it is False.
  
      Args:
          indices (list): list of integer indices
  
          maxval (int): length of the returned list. If not specified
              this is inferred from `indices`
  
      Note:
          In the future the arg `maxval` may change its name to `shape`
  
      Returns:
          list: mask: list of booleans. mask[idx] is True if idx in indices
  
      Example:
          >>> import ubelt as ub
          >>> indices = [0, 1, 4]
          >>> mask = ub.boolmask(indices, maxval=6)
          >>> assert mask == [True, True, False, False, True, False]
          >>> mask = ub.boolmask(indices)
          >>> assert mask == [True, True, False, False, True]