def __init__(self,<EOL>function_name,<EOL>stack_name=None,<EOL>filter_pattern=None,<EOL>start_time=None,<EOL>end_time=None,<EOL>output_file=None):
self._function_name = function_name<EOL>self._stack_name = stack_name<EOL>self._filter_pattern = filter_pattern<EOL>self._start_time = start_time<EOL>self._end_time = end_time<EOL>self._output_file = output_file<EOL>self._output_file_handle = None<EOL>self._must_print_colors = not self._output_file<EOL>self._logs_client = boto3.client('<STR_LIT>')<EOL>self._cfn_client = boto3.client('<STR_LIT>')<EOL>
Initializes the context

Parameters
----------
function_name : str
    Name of the function to fetch logs for

stack_name : str
    Name of the stack where the function is available

filter_pattern : str
    Optional pattern to filter the logs by

start_time : str
    Fetch logs starting at this time

end_time : str
    Fetch logs up to this time

output_file : str
    Write logs to this file instead of Terminal