class_docstr: The list-like object that contains every :class:`SingleImage`
  in the :class:`~wand.image.Image` container.  It implements
  :class:`collections.abc.Sequence` protocol.
  
  .. versionadded:: 0.3.0
class_docstr_tok: ["The","list-like","object","that","contains","every",":","class",":","`","SingleImage","`","in","the",":","class",":","`","~wand.image.Image","`","container",".","It","implements",":","class",":","`","collections.abc.Sequence","`","protocol",".","..","versionadded",":",":","0.3.0"]
docstr: Scoped setter of :attr:`current_index`.  Should be
  used for :keyword:`with` statement e.g.::
  
      with image.sequence.index_context(3):
          print(image.size)
  
  .. note::
  
     It's only for internal use.
docstr_tok: ["Scoped","setter","of",":","attr",":","`","current_index","`",".","Should","be","used","for",":","keyword",":","`","with","`","statement","e.g",".",":",":","with","image.sequence.index_context","(","3",")",":","print","(","image.size",")","..","note",":",":","It","'s","only","for","internal","use","."]
code: def index_context(self, index):
      """Scoped setter of :attr:`current_index`.  Should be
      used for :keyword:`with` statement e.g.::
  
          with image.sequence.index_context(3):
              print(image.size)
  
      .. note::
  
         It's only for internal use.
  
      """
      index = self.validate_position(index)
      tmp_idx = self.current_index
      self.current_index = index
      yield index
      self.current_index = tmp_idx
  
imports: import contextlib
  import ctypes
  import numbers
  from .api import libmagick, library
  from .compat import abc, binary, xrange
  from .image import BaseImage, ImageProperty
  from .version import MAGICK_VERSION_INFO
label_desc: Use image node_id 4 for calling the Sequence obj's underlying member method code with example usage: obj.index_context(index) without return types