docstr: dump image number `image_index` in data `index` to a random
  file in `output_directory`.
docstr_tok: ["dump","image","number","`","image_index","`","in","data","`","index","`","to","a","random","file","in","`","output_directory","`","."]
code: def __init__(
      self,
      dataloader,
      index,
      image_index,
      outshape,
      output_directory=None,
      *args,
      **kwargs,
  ):
      """
      dump image number `image_index` in data `index` to a random
      file in `output_directory`.
      """
      super(DumpImage, self).__init__(
          dataloader, index=index, *args, **kwargs
      )
      self.outshape = outshape
      self.image_index = image_index
      self.output_directory = output_directory or "/tmp"
      if self.output_directory[-1] != "/":
          self.output_directory += "/"
  
imports: from __future__ import division
  import numpy
  from neon import NervanaObject
label_desc: Use image node_id 1 to create a new DumpImage object from inherited base classes: DataLoaderTransformer with example: obj = DumpImage(dataloader, index, image_index, outshape, output_directory)