<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_log_filehandle(context):
 """Open the log and error filehandles. Args: context (scriptworker.context.Context):
 the scriptworker context. Yields: log filehandle """

    log_file_name = get_log_filename(context)
    makedirs(context.config['task_log_dir'])
    with open(log_file_name, "w", encoding="utf-8") as filehandle:
        yield filehandle