def tokenize(smiles):
    """
    Returns list of unique tokens, token-2-index dictionary and number of unique tokens from the list of SMILES

    Args:
        smiles (list): list of SMILES strings to tokenize.

    Returns:
        tokens (list): list of unique tokens/SMILES alphabet.
        token2idx (dict): dictionary mapping token to its index.
        num_tokens (int): number of unique tokens.
    """
    tokens = list(set(''.join(smiles)))
    tokens = ''.join(tokens)
    token2idx = dict((token, i) for i, token in enumerate(tokens))
    num_tokens = len(tokens)
    return tokens, token2idx, num_tokens