def get_normalized_path(dir_):
    """

    >>> get_normalized_path('abc/xyz/')
    'abc/xyz'
    >>> get_normalized_path('abc/xyz')
    'abc/xyz'
    >>> get_normalized_path('abc/xyz.txt')
    'abc/xyz.txt'

    """
    if dir_[-1] == '/':
        return dir_[:-1]
    else:
        return dir_