def format_ret(return_set, as_json=False):
ret_list = list()<EOL>for item in return_set:<EOL><INDENT>d = {"<STR_LIT>": item}<EOL>ret_list.append(d)<EOL><DEDENT>if as_json:<EOL><INDENT>return json.dumps(ret_list)<EOL><DEDENT>return ret_list<EOL>
decouple, allow for modifications to return type
        returns a list of ip addresses in object or json form