<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def ensure_string(obj):
 """Return String and if Unicode convert to string. :param obj: ``str`` || ``unicode`` :return: ``str`` """


    if sys.version_info < (3, 2, 0) and isinstance(obj, unicode):
        return str(obj.encode('utf8'))
    else:
        return obj