<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _get_text_sequence(self, text, span, context_length):
 """Returns the subset of `text` encompassed by `span`, plus `context_length` characters before and after. :param text: text to extract the sequence from :type text: `str` :param span: start and end indices within `text` :type span: 2-`tuple` of `int` :param context_length: length of context on either side of `span` to include in the extract :type context_length: `int` """

        start = max(0, span[0] - context_length)
        end = min(len(text), span[1] + context_length)
        return text[start:end], (start, end)