code: def _getThread(self, given_thread_id=None, given_thread_type=None):
          
          if given_thread_id is None:
              if self._default_thread_id is not None:
                  return self._default_thread_id, self._default_thread_type
              else:
                  raise ValueError("Thread ID is not set")
          else:
              return given_thread_id, given_thread_type
docs: Checks if thread ID is given, checks if default is set and returns correct values
  
          :raises ValueError: If thread ID is not given and there is no default
          :return: Thread ID and thread type
          :rtype: tuple