code: def get_samplepos_of_bitseq(self, start_message: int, start_index: int, end_message: int, end_index: int,
                                  include_pause: bool):
          
          try:
              if start_message > end_message:
                  start_message, end_message = end_message, start_message
  
              if start_index >= len(self.messages[start_message].bit_sample_pos) - 1:
                  start_index = len(self.messages[start_message].bit_sample_pos) - 1
                  if not include_pause:
                      start_index -= 1
  
              if end_index >= len(self.messages[end_message].bit_sample_pos) - 1:
                  end_index = len(self.messages[end_message].bit_sample_pos) - 1
                  if not include_pause:
                      end_index -= 1
  
              start = self.messages[start_message].bit_sample_pos[start_index]
              num_samples = self.messages[end_message].bit_sample_pos[end_index] - start
  
              return start, num_samples
          except (KeyError, IndexError):
              return -1, -1
docs: Determine on which place (regarding samples) a bit sequence is
          :rtype: tuple[int,int]