<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_stack_frame(self, stack_frame):
 """Add StackFrame to frames list."""

        if len(self.stack_frames) >= MAX_FRAMES:
            self.dropped_frames_count += 1
        else:
            self.stack_frames.append(stack_frame.format_stack_frame_json())