code: def image_data(data):
      import gradio as gr
  
      try:
          image = Image.open(io.BytesIO(data))
          textinfo, _ = read_info_from_image(image)
          return textinfo, None
      except Exception:
          pass
  
      try:
          text = data.decode("utf8")
          assert len(text) < 10000
          return text, None
  
      except Exception:
          pass
  
      return gr.update(), None
  
imports: from __future__ import annotations
  import datetime
  import pytz
  import io
  import math
  import os
  from collections import namedtuple
  import re
  import numpy
  import piexif
  import piexif.helper
  from PIL import Image, ImageFont, ImageDraw, ImageColor, PngImagePlugin
  import string
  import json
  import hashlib
  from modules import sd_samplers, shared, script_callbacks, errors
  from modules.paths_internal import roboto_ttf_file
  from modules.shared import opts
label_desc: Use image node_id 13 for calling a global function with example usage: image_data(data) and returns: gr,  None, textinfo,  None, text,  None