import six


def ensure_unicode(path):
    """
    Make sure that the value is in Unicode.

    On Python 2, it means converting the `str` instance to `unicode` instance.

    :param path str: The string to convert to Unicode.
    """
    if six.PY2:
        if isinstance(path, str):
            return six.u(path)
    return path