<s> import json <EOL> import os <EOL> import sys <EOL> import importlib <EOL> sys . path . append ( os . path . realpath ( '<STR_LIT>' ) ) <EOL> client_module = importlib . import_module ( '<STR_LIT>' ) <EOL> SampleUtilities = importlib . import_module ( '<STR_LIT>' ) <EOL> def main ( ) : <EOL> client = client_module . RestApiClient ( version = '<STR_LIT>' ) <EOL> SampleUtilities . pretty_print_request ( <EOL> client , '<STR_LIT>' + <EOL> '<STR_LIT>' , '<STR_LIT:GET>' ) <EOL> response = client . call_api ( <EOL> '<STR_LIT>' + <EOL> '<STR_LIT>' , '<STR_LIT:GET>' ) <EOL> SampleUtilities . pretty_print_response ( response ) <EOL> if ( response . code != <NUM_LIT:200> ) : <EOL> print ( '<STR_LIT>' ) <EOL> sys . exit ( <NUM_LIT:1> ) <EOL> offense_ID = input ( <EOL> '<STR_LIT>' ) <EOL> while True : <EOL> if ( offense_ID == '<STR_LIT>' ) : <EOL> exit ( <NUM_LIT:0> ) <EOL> SampleUtilities . pretty_print_request ( client , '<STR_LIT>' + <EOL> str ( offense_ID ) , '<STR_LIT:GET>' ) <EOL> response = client . call_api ( '<STR_LIT>' + str ( offense_ID ) , '<STR_LIT:GET>' ) <EOL> response_text = response . read ( ) . decode ( '<STR_LIT:utf-8>' ) <EOL> if ( response . code == <NUM_LIT:200> ) : <EOL> response_body = json . loads ( response_text ) <EOL> if ( response_body [ '<STR_LIT:status>' ] != '<STR_LIT>' ) : <EOL> offense_ID = input ( '<STR_LIT>' + <EOL> '<STR_LIT>' ) <EOL> else : <EOL> break <EOL> else : <EOL> offense_ID = input ( '<STR_LIT>' + <EOL> '<STR_LIT>' ) <EOL> print ( json . dumps ( response_body , indent = <NUM_LIT:4> ) ) <EOL> while True : <EOL> confirmation = input ( <EOL> '<STR_LIT>' + <EOL> '<STR_LIT>' ) <EOL> if ( confirmation == '<STR_LIT>' ) : <EOL> SampleUtilities . pretty_print_request ( <EOL> client , '<STR_LIT>' + offense_ID + <EOL> '<STR_LIT>' + <EOL> '<STR_LIT>' , '<STR_LIT:POST>' ) <EOL> response = client . call_api ( <EOL> '<STR_LIT>' + offense_ID + '<STR_LIT>' + <EOL> '<STR_LIT>' , <EOL> '<STR_LIT:POST>' ) <EOL> SampleUtilities . pretty_print_response ( response ) <EOL> if ( response . code != <NUM_LIT:200> ) : <EOL> print ( '<STR_LIT>' ) <EOL> SampleUtilities . pretty_print_response ( response ) <EOL> sys . exit ( <NUM_LIT:1> ) <EOL> print ( '<STR_LIT>' + offense_ID + '<STR_LIT>' ) <EOL> break <EOL> elif ( confirmation == '<STR_LIT>' ) : <EOL> print ( '<STR_LIT>' + offense_ID + <EOL> '<STR_LIT>' ) <EOL> break <EOL> else : <EOL> print ( confirmation + '<STR_LIT>' ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> main ( ) </s>
