Walk me through an automation project you built: what did you import, and how did it automate the operations?
Asked in the technical round stage, this question evaluates how clearly you connect imports to automated behavior. For this coding exercise, implement the following minimal model.
Given import statements and operation records, return the imported modules that actually perform operations, along with each module's actions in first-seen order. Ignore operations whose module was not imported.
Signature: analyze_automation(import_lines, operations)
Input: import_lines is a list of strings. operations is a list of objects with module and action strings.
Output: Return {"modules": [...], "operations": {module: [actions]}}.
Example: imports ['import boto3'], operations [{"module":"boto3","action":"provision"}] returns {"modules":["boto3"],"operations":{"boto3":["provision"]}}.
import module or from module import name syntaxdef analyze_automation(import_lines, operations):