def get_full_path(path, language, bookmark=''):
    """ Utility function to build a valid path based on an initial
    :param path: the initial path
    :param language: language component
    :param bookmark: bookmark, if any
    :return: a valid path string
    """
    if not path.startswith('/'):
        path = '/' + path
    if not path.endswith('/'):
        path += '/'
    path += bookmark
    if language and settings.I18N_URLS:  # pragma: nocover
        path = '/' + language + path
    return path
dataset/ETHPy150Open Wtower/django-ninecms/ninecms/utils/nodes.py/get_full_path/original