class_docstr: Utility class to represent and manipulate tags.
  Attributes:
      x:
          An integer representation of the binary mask.
  Examples:
      >>> # the following are equivalent
      >>> mask = BitMask(6)
      >>> mask = BitMask.from_hex('0x6')
      >>> mask = Bitmask.from_bin('0b0110')
      >>> # for a dataset with 10 images, assume the following tag
      >>> # 0001011001 where the 1st, 4th, 5th and 7th image are selected
      >>> # this tag would be stored as 0x59.
      >>> hexstring = '0x59'                    # what you receive from the api
      >>> mask = BitMask.from_hex(hexstring)  # create a bitmask from it
      >>> indices = mask.to_indices()         # get list of indices which are one
      >>> # indices is [0, 3, 4, 6]
docstr: 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]
docstr_tok: ["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","]"]
code: 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]
  
imports: import copy
  from typing import List
label_desc: Use image node_id 15 for calling the BitMask obj's underlying member method code with example usage: obj.masked_select_from_list(list_) and returns: unknown