def masked_select_from_list(self, list_: List):
        """Returns a subset of a list depending on the bitmask.

        The bitmask is read from right to left, i.e. the least significant bit
        corresponds to index 0.

        Examples:
            >>> list_to_subset = [4, 7, 9, 1]
            >>> mask = BitMask.from_bin("0b0101")
            >>> masked_list = mask.masked_select_from_list(list_to_subset)
            >>> # masked_list = [4, 9]

        """
        indices = self.to_indices()
        return [list_[index] for index in indices]
Returns a subset of a list depending on the bitmask.

        The bitmask is read from right to left, i.e. the least significant bit
        corresponds to index 0.

        Examples:
            >>> list_to_subset = [4, 7, 9, 1]
            >>> mask = BitMask.from_bin("0b0101")
            >>> masked_list = mask.masked_select_from_list(list_to_subset)
            >>> # masked_list = [4, 9]

        
lightly/api/bitmask.py