def_search(self,query:str)->List[dict]:headers={"Accept":"application/json",}req=requests.PreparedRequest()request={**self.search_kwargs,**{"q":query,"fmt":"json","api_key":self.api_key},}req.prepare_url(self.api_url,request)ifreq.urlisNone:raiseValueError("prepared url is None, this should not happen")response=requests.get(req.url,headers=headers)ifnotresponse.ok:raiseException(f"HTTP error {response.status_code}")returnresponse.json().get("response",{}).get("results",[])