class_docstr: Utility class to make image slicing uniform across various `image_data_format`.
      
class_docstr_tok: ["Utility","class","to","make","image","slicing","uniform","across","various","`","image_data_format","`","."]
docstr: Assuming a slice for shape `(samples, channels, image_dims...)`
          
docstr_tok: ["Assuming","a","slice","for","shape","`","(","samples",",","channels",",","image_dims","...",")","`"]
code: def __getitem__(self, item_slice):
      """Assuming a slice for shape `(samples, channels, image_dims...)`"""
      if K.image_data_format() == "channels_first":
          return item_slice
      else:
          # Move channel index to last position.
          item_slice = list(item_slice)
          item_slice.append(item_slice.pop(1))
          return tuple(item_slice)
  
imports: from __future__ import absolute_import
  from __future__ import division
  import os
  import tempfile
  import math
  import json
  import six
  import numpy
  import matplotlib.font_manager
  from skimage import io, transform
  from keras import backend
  from keras.models import load_model
  import logging
label_desc: Use image node_id 1 for calling the _BackendAgnosticImageSlice obj's underlying member method code with example usage: obj.__getitem__(item_slice) and returns: item_slice, tuple