def METHOD_NAME(bot, trigger):
    """Finds an xkcd comic strip.
    Takes one of 3 inputs:
      * If no input is provided it will return a random comic
      * If numeric input is provided it will return that comic, or the
        nth-latest comic if the number is non-positive
      * If non-numeric input is provided it will return the first search result
        for those keywords on the xkcd.com site
    """
    # get latest comic for rand function and numeric input
    latest = get_info()
    max_int = latest['num']
    # if no input is given (pre - lior's edits code)
    if not trigger.group(2):  # get rand comic
        random.seed()
        requested = get_info(random.randint(1, max_int + 1))
    else:
        query = trigger.group(2).strip()
        numbered = re.match(r"^(#|\+|-)?(\d+)$", query)
        if numbered:
            query = int(numbered.group(2))
            if numbered.group(1) == "-":
                query = -query
            return numbered_result(bot, query, latest)
        else:
            # Non-number: search the web.
            if (query.lower() == "latest" or query.lower() == "newest"):
                requested = latest
            else:
                number = searchxkcd_search(query)
                if number is None:
                    # generic web-search engine as fallback
                    number = web_search(query)
                if not number:
                    bot.reply('Could not find any comics for that query.')
                    return
                requested = get_info(number)
    say_result(bot, requested)