<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def fold_path(path, width=30):
 """ Fold a string form of a path so that each element is on separate line """

    assert isinstance(path, six.string_types)
    if len(path) > width:
        path.replace(".", ".\n    ")
    return path