<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def main(tex_file, output, verbose):
 """ FLaP merges your LaTeX projects into a single LaTeX file that refers to images in the same directory. It reads the given root TEX_FILE and generates a flatten version in the given OUTPUT directory. It inlines the content of any TeX files refered by \\input or \\include but also copies resources such as images (JPG, EPS, PDF, etc.) as well as other resources (class and package definitions, BibTeX files, etc.). """

    Controller(OSFileSystem(), Display(sys.stdout, verbose)).run(tex_file, output)