def METHOD_NAME(self) -> None:
    """
    Ensure that get_thread_id_for_receipts searches up and down the tree for a thread.
    """
    # All of the events are considered related to this thread.
    thread_id = self.get_success(self._main_store.get_thread_id_for_receipts("A"))
    self.assertEqual("A", thread_id)
    thread_id = self.get_success(self._main_store.get_thread_id_for_receipts("B"))
    self.assertEqual("A", thread_id)
    thread_id = self.get_success(self._main_store.get_thread_id_for_receipts("C"))
    self.assertEqual("A", thread_id)
    thread_id = self.get_success(self._main_store.get_thread_id_for_receipts("D"))
    self.assertEqual("A", thread_id)
    thread_id = self.get_success(self._main_store.get_thread_id_for_receipts("E"))
    self.assertEqual("A", thread_id)
    # Events which are not related to a thread at all should return the
    # main timeline.
    thread_id = self.get_success(self._main_store.get_thread_id("F"))
    self.assertEqual(MAIN_TIMELINE, thread_id)
    thread_id = self.get_success(self._main_store.get_thread_id("G"))
    self.assertEqual(MAIN_TIMELINE, thread_id)