@staticmethod<EOL><INDENT>def get_lambda_output(stdout_stream):<DEDENT>
<EOL>stdout_data = stdout_stream.getvalue().rstrip(b'<STR_LIT:\n>')<EOL>lambda_response = stdout_data<EOL>lambda_logs = None<EOL>last_line_position = stdout_data.rfind(b'<STR_LIT:\n>')<EOL>if last_line_position >= <NUM_LIT:0>:<EOL><INDENT>lambda_logs = stdout_data[:last_line_position]<EOL>lambda_response = stdout_data[last_line_position:].strip()<EOL><DEDENT>lambda_response = lambda_response.decode('<STR_LIT:utf-8>')<EOL>is_lambda_user_error_response = LambdaOutputParser.is_lambda_error_response(lambda_response)<EOL>return lambda_response, lambda_logs, is_lambda_user_error_response<EOL>
This method will extract read the given stream and return the response from Lambda function separated out
from any log statements it might have outputted. Logs end up in the stdout stream if the Lambda function
wrote directly to stdout using System.out.println or equivalents.

Parameters
----------
stdout_stream : io.BaseIO
    Stream to fetch data from

Returns
-------
str
    String data containing response from Lambda function
str
    String data containng logs statements, if any.
bool
    If the response is an error/exception from the container