@staticmethod
PYL-R0201 84 images = [f"https://img.craiyon.com/{path}" for path in json_response["images"]]
85 return CraiyonAPI.GenerationResult(images, json_response["next_prompt"], duration)
86
87 def search(self, http_client: requests.Session, text: str) -> List[Tuple[str, str]]: 88 """
89 Searches for images related to the provided text.
90
The method doesn't use its bound instance. Decorate this method with @staticmethod
decorator, so that Python does not have to instantiate a bound method for every instance of this class thereby saving memory and computation. Read more about staticmethods here.