<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_all_threads(self, expand=False):
 """Return every thread on this board. If not expanded, result is same as get_threads run across all board pages, with last 3-5 replies included. Uses the catalog when not expanding, and uses the flat thread ID listing at /{board}/threads.json when expanding for more efficient resource usage. If expanded, all data of all threads is returned with no omitted posts. Args: expand (bool):
 Whether to download every single post of every thread. If enabled, this option can be very slow and bandwidth-intensive. Returns: list of :mod:`basc_py4chan.Thread`: List of Thread objects representing every thread on this board. """

        if not expand:
            return self._request_threads(self._url.catalog())

        thread_ids = self.get_all_thread_ids()
        threads = [self.get_thread(id, raise_404=False) for id in thread_ids]

        return filter(None, threads)