<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 async def enqueue(self, query, queue_index=None, stop_current=False, shuffle=False):
 """ Queues songs based on either a YouTube search or a link Args: query (str):
 Either a search term or a link queue_index (str):
 The queue index to enqueue at (None for end) stop_current (bool):
 Whether to stop the current song after the songs are queued shuffle (bool):
 Whether to shuffle the added songs """


        if query is None or query == "":
            return

        self.statuslog.info("Parsing {}".format(query))
        self.logger.debug("Enqueueing from query")

        indexnum = None
        if queue_index is not None:
            try:
                indexnum = int(queue_index) - 1
            except TypeError:
                self.statuslog.error("Play index argument must be a number")
                return
            except ValueError:
                self.statuslog.error("Play index argument must be a number")
                return

        if not self.vready:
            self.parse_query(query, indexnum, stop_current, shuffle)
        else:
            parse_thread = threading.Thread(
                target=self.parse_query,
                args=[query, indexnum, stop_current, shuffle])
            # Run threads
            parse_thread.start()