create a function which takes input dictionary of format and returns a dictionary with…
- User
create a function which takes input dictionary of format and returns a dictionary with keys as scenario_name and values as description
{'test_scenarios': [{'scenario_name': 'Test valid standard import', 'description': 'Ensure the function can correctly parse a file with standard import statements.', 'input': 'A Python file containing "import os', 'expected_output': "['import os', 'import sys']", 'reasoning': "This scenario tests the function's ability to extract simple, valid import statements as expected."}, {'scenario_name': 'Test valid from import', 'description': 'Ensure the function can correctly parse a file with from-import statements.', 'input': 'A Python file containing "from math import sqrt, pi', 'expected_output': "['from math import sqrt, pi', 'from datetime import datetime as dt']", 'reasoning': 'This scenario verifies that the function can handle imports from specific modules including aliasing.'}]}
- Assistant
Here's a Python function that takes the dictionary (in the format you provided) as input and returns a dictionary where the keys are the
scenario_namevalues and the corresponding values are thedescriptionstrings:python