def add_trailing_slash(path):
    """Add a trailing slash if not present

    Parameters
    ----------
    path : str
        A string representing a path

    Returns
    -------
    str
        A new string with a trailing / if not previously present.
    """
    if path[-1] != '/':
        path += '/'
    return path