code: def get_cloud_masks(self, threshold=None, non_valid_value=False):
          
          self.get_probability_masks()
  
          cloud_masks = self.cloud_detector.get_mask_from_prob(self.probability_masks, threshold)
          cloud_masks[~self.valid_data] = non_valid_value
  
          return cloud_masks
docs: The binary cloud mask is computed on the fly. Be cautious. The pixels without valid data are assigned
          non_valid_value.
  
          :param threshold: A float from [0,1] specifying threshold
          :type threshold: float
          :param non_valid_value: Value which will be assigned to pixels without valid data
          :type non_valid_value: int in range `[-254, 255]`
          :return: Binary cloud masks of shape `(times, height, width)` and `dtype=numpy.int8`
          :rtype: numpy.ndarray