code: def _get_image_from_kw(kw):
      source = None
      if "file" in kw:
          source = kw.pop("file")
      elif "data" in kw:
          source = BytesIO(kw.pop("data"))
      if source:
          return Image.open(source)
  
file_path: pillow-simd/src/PIL/ImageTk.py
imports: import tkinter
  from io import BytesIO
  from .None import Image
label_desc: Use image node_id 2 for calling a global function with example usage: _get_image_from_kw(kw) and returns: Image