code: def _get_data(feature, target):
      from PIL import Image as _PIL_Image
  
      rs = np.random.RandomState(1234)
  
      def from_pil_image(pil_img, image_format="png"):
          if image_format == "raw":
              image = np.array(pil_img)
              FORMAT_RAW = 2
              return tc.Image(
                  _image_data=image.tobytes(),
                  _width=image.shape[1],
                  _height=image.shape[0],
                  _channels=image.shape[2],
                  _format_enum=FORMAT_RAW,
                  _image_data_size=image.size,
              )
          else:
              with tempfile.NamedTemporaryFile(
                  mode="w+b", suffix="." + image_format
              ) as f:
                  pil_img.save(f, format=image_format)
                  return tc.Image(f.name)
  
      num_examples = 100
      num_starter_images = 5
      max_num_boxes_per_image = 10
      classes = _CLASSES
      images = []
      FORMATS = ["png", "jpeg", "raw"]
      for _ in range(num_examples):
          # Randomly determine image size (should handle large and small)
          img_shape = tuple(rs.randint(100, 1000, size=2)) + (3,)
          img = rs.randint(255, size=img_shape)
  
          pil_img = _PIL_Image.fromarray(img, mode="RGB")
          # Randomly select image format
          image_format = FORMATS[rs.randint(len(FORMATS))]
          images.append(
              from_pil_image(pil_img, image_format=image_format)
          )
  
      starter_images = []
      starter_target = []
      for i in range(num_starter_images):
          img_shape = tuple(rs.randint(100, 1000, size=2)) + (3,)
          img = rs.randint(255, size=img_shape)
          pil_img = _PIL_Image.fromarray(img, mode="RGB")
          image_format = FORMATS[rs.randint(len(FORMATS))]
          starter_images.append(
              from_pil_image(pil_img, image_format=image_format)
          )
          starter_target.append(_CLASSES[i % len(_CLASSES)])
  
      train = tc.SFrame(
          {
              feature: tc.SArray(starter_images),
              target: tc.SArray(starter_target),
          }
      )
      test = tc.SFrame(
          {
              feature: tc.SArray(images),
          }
      )
      backgrounds = test[feature].head(5)
      return train, test, backgrounds
  
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  import unittest
  import pytest
  from .None import util
  import turicreate
  import tempfile
  import numpy
  import platform
  import pytest
  import sys
  import os
  from turicreate.toolkits._main import ToolkitError
  from turicreate.toolkits._internal_utils import _raise_error_if_not_sarray, _mac_ver
label_desc: Use image node_id 1 for calling a global function with example usage: _get_data(feature, target) and returns: train,  test,  backgrounds, tc, tc