Give me py script that doing the next: Check in D:\Pictures\Stable Diffusion\ all png images whose name does not have this in beginning of filename: A_767_ , where 767 can be any digits (e.g. A_375_, A_992_). Every of images that don't have this will be processed. The images will be send in two APIs as base64, like this GET wss://geonmo-laion-aesthetic-predictor.hf.space/queue/join I send {"session_hash":"qi6gzny8yz","fn_index":0} I receive one or few of like this: {"msg": "estimation", "rank": 0, "queue_size": 1, "avg_event_process_time": 1.8798251752691255, "avg_event_concurrent_process_time": 1.8798251752691255, "rank_eta": 1.8798251752691255, "queue_eta": 0} I receive {"msg": "send_data"} I send the image like here (the data of image is shortened in this example): {"fn_index":0,"data":["data:image/png;base64,iVBORwRK5CYII="],"session_hash":"qi6gzny8yz"} I receive {"msg": "process_starts"} Final output: {"msg": "process_completed", "output": {"data": [{"aesthetic score": 6.620365619659424}], "is_generating": false, "duration": 2.2760610580444336, "average_duration": 1.8397605581048093}, "success": true} In this output, I need what is 6.620365619659424 in this example. It will be converted into other type of number: 662 in this case. It will become variable rating_a. Then do all the same but for GET wss://skytnt-anime-aesthetic-predict.hf.space/queue/join The final output will be like this {"msg": "process_completed", "output": {"data": [0.7920163869857788], "is_generating": false, "duration": 2.2073814868927, "average_duration": 2.4626937837695757}, "success": true} I need what is 0.7920163869857788 . It will be converted into other type on number, 792 in this case. It will become a variable rating_b. Then, an average number between rating_a and rating_b will become final_rating. The currently processed image will be renamed and the number will be placed in beginning of its filename as A_192_ (instead of 192, content of final_rating. If name was image.png , it become A_192_image.png , or A_501_image.png etc) Then, continue to process png images until every will have the required change in filename.