def ensure_path(path):
if isinstance(path, basestring_):<EOL><INDENT>return Path(path)<EOL><DEDENT>else:<EOL><INDENT>return path<EOL><DEDENT>
Ensure string is converted to a Path.

    path: Anything. If string, it's converted to Path.
    RETURNS: Path or original argument.