def basescript(line):
log = json.loads(line)<EOL>return dict(<EOL>timestamp=log['<STR_LIT>'],<EOL>data=log,<EOL>id=log['<STR_LIT:id>'],<EOL>type=log['<STR_LIT:type>'],<EOL>level=log['<STR_LIT>'],<EOL>event=log['<STR_LIT>']<EOL>)<EOL>
>>> import pprint
>>> input_line = '{"level": "warning", "timestamp": "2018-02-07T06:37:00.297610Z", "event": "exited via keyboard interrupt", "type": "log", "id": "20180207T063700_4d03fe800bd111e89ecb96000007bc65", "_": {"ln": 58, "file": "/usr/local/lib/python2.7/dist-packages/basescript/basescript.py", "name": "basescript.basescript", "fn": "start"}}'
>>> output_line1 = basescript(input_line)
>>> pprint.pprint(output_line1)
{'data': {u'_': {u'file': u'/usr/local/lib/python2.7/dist-packages/basescript/basescript.py',
                 u'fn': u'start',
                 u'ln': 58,
                 u'name': u'basescript.basescript'},
          u'event': u'exited via keyboard interrupt',
          u'id': u'20180207T063700_4d03fe800bd111e89ecb96000007bc65',
          u'level': u'warning',
          u'timestamp': u'2018-02-07T06:37:00.297610Z',
          u'type': u'log'},
 'event': u'exited via keyboard interrupt',
 'id': u'20180207T063700_4d03fe800bd111e89ecb96000007bc65',
 'level': u'warning',
 'timestamp': u'2018-02-07T06:37:00.297610Z',
 'type': u'log'}