def check_token(token, stopwords_set, punctuation_set):
    """
    Checks whether token is valid, i.e. not a stopword or punctuation.
    :param token: Input token to be checked
    :type token: str
    :param stopwords_set: List of stopwords (most common words in a language with
                           little to no semantic significance)
    :type stopwords_set: set(str) or list(str)
    :param punctuation_set: List of punctuation characters
    :type punctuation_set: set(str) or list(str)
    :return: True if valid, False if stopword or punctuation
    :rtype: bool
    """
    punctuation = True
    for character in token:
        if character not in punctuation_set:
            punctuation = False
            break

    if punctuation:
        return False

    if token in stopwords_set:
        return False

    return True