def METHOD_NAME(self, tokens: List[str]):
    """ Converts a sequence of tokens into ids using the vocab. """
    ids = []
    cindex = 0
    if NEW_LINE in tokens:
        idd = tokens.index(NEW_LINE)
        cindex = (self.num_columns - idd) % self.num_columns
    for token in tokens:
        if token in self.special_tokens:
            ids.append(self.special_tokens[token])
        else:
            index = cindex % self.num_columns
            column = self.code_column.columns[index]
            ids.extend(self.code_column.encode(column, token))
            cindex += 1
    return ids