#NEWLINE# def get_audit_logs( self , time_range_start , time_range_end ) : #NEWLINE# #INDENT# "Returns a list of audit logs.\n\n        :param str time_range_start: ISO format for time range starting point.\n        :param str time_range_end: ISO for time range ending point.\n        :return: A dictionary of multiple audit logs, e.g.,\n            {\n                'logs': [\n                    {\n                        'job_id': ...\n                        'event': ...\n                        'user': ...\n                        'description': ...\n                    }\n                ]\n            }\n\n            Sorted by created_time.\n        :rtype: dict\n        " #NEWLINE# utc = dateutil . tz . gettz ( 'UTC' ) #NEWLINE# start_time = dateutil . parser . parse ( time_range_start ) . replace ( tzinfo = utc ) #NEWLINE# end_time = dateutil . parser . parse ( time_range_end ) . replace ( tzinfo = utc ) #NEWLINE# selectable = select ( '*' ) . where ( tables . AUDIT_LOGS . c . created_time . between ( start_time , end_time ) ) . order_by ( desc ( tables . AUDIT_LOGS . c . created_time ) ) #NEWLINE# rows = self . engine . execute ( selectable ) #NEWLINE# return_json = { #NEWLINE# #INDENT# 'logs' : [ self . _build_audit_log ( row ) for row in rows ] , #NEWLINE# #UNINDENT# } #NEWLINE# return return_json