code: def fold_path(path, width=30):
      
      assert isinstance(path, six.string_types)
      if len(path) > width:
          path.replace(".", ".\n    ")
      return path
docs: Fold a string form of a path so that each element is on separate line