Write a function to detect a specific pattern in a stream of sensor data at Bee Robotics.
Given a list of sensor readings and a target pattern, return True when the pattern appears as a contiguous subsequence of the stream, otherwise return False. Use the function signature def detect_pattern(stream, pattern):. An empty pattern is considered present in every stream.
def detect_pattern(stream, pattern):