code: def prepare(image, size=(224, 224)):
      """Converts the given image to the numpy array for GoogLeNet.
  
      Note that you have to call this method before ``forward``
      because the pre-trained GoogLeNet model requires to resize the given
      image, covert the RGB to the BGR, subtract the mean,
      and permute the dimensions before calling.
  
      Args:
          image (PIL.Image or numpy.ndarray): Input image.
              If an input is ``numpy.ndarray``, its shape must be
              ``(height, width)``, ``(height, width, channels)``,
              or ``(channels, height, width)``, and
              the order of the channels must be RGB.
          size (pair of ints): Size of converted images.
              If ``None``, the given image is not resized.
  
      Returns:
          numpy.ndarray: The converted output array.
  
      """
  
      if not available:
          raise ImportError(
              "PIL cannot be loaded. Install Pillow!\n"
              "The actual import error is as follows:\n"
              + str(_import_error)
          )
      dtype = chainer.get_dtype()
      if isinstance(image, numpy.ndarray):
          if image.ndim == 3:
              if image.shape[0] == 1:
                  image = image[0, :, :]
              elif image.shape[0] == 3:
                  image = image.transpose((1, 2, 0))
          image = Image.fromarray(image.astype(numpy.uint8))
      image = image.convert("RGB")
      if size:
          image = image.resize(size)
      image = numpy.asarray(image, dtype=dtype)
      image = image[:, :, ::-1]
      image -= numpy.array([104.0, 117.0, 123.0], dtype=dtype)  # BGR
      image = image.transpose((2, 0, 1))
      return image
  
imports: import collections
  import os
  import sys
  import numpy
  import chainer
  from chainer.dataset.convert import concat_examples
  from chainer.dataset import download
  from chainer import function
  from chainer.functions.activation.relu import relu
  from chainer.functions.activation.softmax import softmax
  from chainer.functions.array.reshape import reshape
  from chainer.functions.math.average import average
  from chainer.functions.noise.dropout import dropout
  from chainer.functions.normalization.local_response_normalization import local_response_normalization
  from chainer.functions.pooling.average_pooling_2d import average_pooling_2d
  from chainer.functions.pooling.max_pooling_nd import max_pooling_2d
  from chainer.initializers import constant
  from chainer.initializers import uniform
  from chainer import link
  from chainer.links.connection.convolution_2d import Convolution2D
  from chainer.links.connection.inception import Inception
  from chainer.links.connection.linear import Linear
  from chainer.serializers import npz
  from chainer.utils import argument
  from chainer.utils import imgproc
  from chainer.variable import Variable
label_desc: Use image node_id 1 for calling a global function with example usage: prepare(image, size) and returns: image