<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def generate_index_file(filename):
 """Constructs a default home page for the project."""

    with open(filename, 'w') as file:
        content = open(os.path.join(os.path.dirname(__file__), 'templates/index_page.html'), 'r').read()
        file.write(content)