<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def build_tree_pathname(filename, directory_depth=8, pathname_separator_character=os.sep):
 """ Return a pathname built of the specified number of sub-directories, and where each directory is named after the nth letter of the filename corresponding to the directory depth. Examples:: 'f/o/' '0/1/2/3/4/5/6/7/' @param filename: name of a file, with or without extension. @param directory_depth: number of sub-directories to be generated. @param pathname_separator_character: character to be used to separate pathname components, such as '/' for POSIX and '\\' for Windows. If not defined, the default is the character used by the operating system ``os.sep``. @return: a file pathname. """

    pathname = ''
    (filename_without_extension, _file_extension_) = os.path.splitext(filename)

    for i in range(min(directory_depth, len(filename_without_extension))):
        pathname += filename_without_extension[i] + pathname_separator_character

    return pathname