<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def path_to_str(path):
 """ Convert pathlib.Path objects to str; return other objects as-is. """

    try:
        from pathlib import Path as _Path
    except ImportError:  # Python < 3.4
        class _Path:
            pass
    if isinstance(path, _Path):
        return str(path)
    return path