code: def _load_image_from_url(image_url):
      try:
          from PIL import Image
      except:
          raise Exception(
              "gemini image conversion failed please run `pip install Pillow`"
          )
      from io import BytesIO
  
      try:
          # Send a GET request to the image URL
          response = requests.get(image_url)
          response.raise_for_status()  # Raise an exception for HTTP errors
  
          # Check the response's content type to ensure it is an image
          content_type = response.headers.get("content-type")
          if not content_type or "image" not in content_type:
              raise ValueError(
                  f"URL does not point to a valid image (content-type: {content_type})"
              )
  
          # Load the image from the response content
          return Image.open(BytesIO(response.content))
  
      except requests.RequestException as e:
          print(f"Request failed: {e}")
      except UnidentifiedImageError:
          print(
              "Cannot identify image file (it may not be a supported image format or might be corrupted)."
          )
      except ValueError as e:
          print(e)
  
imports: from enum import Enum
  import requests, traceback
  import json
  from jinja2 import Template, exceptions, Environment, meta
  from typing import Optional, Any
label_desc: Use image node_id 16 for calling a global function with example usage: _load_image_from_url(image_url) and returns: Image