'Create a Text object.
:param tokens: The source text.
:type tokens: sequence of str'

def __init__(self, tokens, name=None):

    if self._COPY_TOKENS:
        tokens = list(tokens)
    self.tokens = tokens
    if name:
        self.name = name
    elif (u']' in tokens[:20]):
        end = tokens[:20].index(u']')
        self.name = u'    '.join((text_type(tok) for tok in tokens[1:end]))
    else:
        self.name = (u'    '.join((text_type(tok) for tok in tokens[:8])) + u'...')
