def add_trailing_slash(directory_path):
    # Add trailing slash.
    if directory_path[-1] != '/':
        directory_path=str().join([directory_path, '/'])
    # Return directory_path with trailing slash.
    return directory_path
>>> text = '''
dataset/ETHPy150Open nasa-gibs/onearth/src/layer_config/bin/oe_configure_layer.py/add_trailing_slash--crossover with--dataset/ETHPy150Open limodou/par/test/test_md.py/test_dl_6