<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_str(string):
 """ Python 2 and 3 compatible string checker. Args: string (str | basestring):
 the string to check Returns: bool: True or False """

    if sys.version_info[:2] >= (3, 0):
        return isinstance(string, str)

    return isinstance(string, basestring)