def get_folder_subpath(path, folder_depth):
if path[<NUM_LIT:0>] == op.sep:<EOL><INDENT>folder_depth += <NUM_LIT:1><EOL><DEDENT>return op.sep.join(path.split(op.sep)[<NUM_LIT:0>:folder_depth])<EOL>
Returns a folder path of path with depth given by folder_dept:

Parameters
----------
path: str

folder_depth: int > 0

Returns
-------
A folder path

Example
-------
>>> get_folder_subpath('/home/user/mydoc/work/notes.txt', 3)
>>> '/home/user/mydoc'