<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def is_type_text_string(obj):

 """Return True if `obj` is type text string, False if it is anything else,
 like an instance of a class that extends the basestring class."""

    if PY2:
        # Python 2
        return type(obj) in [str, unicode]
    else:
        # Python 3
        return type(obj) in [str, bytes]