docstr: Return slices for the first and second images for copying
  
  offset - amount to offset the second image relative to the first
  
  returns two slices, the first to apply to the first image, second
  to apply to the second image.
docstr_tok: ["Return","slices","for","the","first","and","second","images","for","copying","offset","-","amount","to","offset","the","second","image","relative","to","the","first","returns","two","slices",",","the","first","to","apply","to","the","first","image",",","second","to","apply","to","the","second","image","."]
code: def slice_helper(self, offset, size):
      """Return slices for the first and second images for copying
  
      offset - amount to offset the second image relative to the first
  
      returns two slices, the first to apply to the first image, second
      to apply to the second image.
      """
      if offset < 0:
          return slice(-offset, size), slice(0, size + offset)
      else:
          return slice(0, size - offset), slice(offset, size)
  
imports: from io import StringIO
  import numpy
  from cellprofiler_core.constants.measurement import COLTYPE_INTEGER
  from cellprofiler_core.measurement import Measurements
  from cellprofiler_core.modules.align import Align, A_SIMILARLY, A_SEPARATELY, M_MUTUAL_INFORMATION, C_SAME_SIZE, C_CROP, C_PAD, M_CROSS_CORRELATION, MEASUREMENT_FORMAT, C_ALIGN
  from cellprofiler_core.object import ObjectSet
  from cellprofiler_core.pipeline import Pipeline, LoadException
  from cellprofiler_core.preferences import set_headless
  from cellprofiler_core.workspace import Workspace
  from tests.core.modules import read_example_image
  from cellprofiler_core.image import ImageSetList, Image
label_desc: Use image node_id 6 for calling the TestAlign obj's underlying member method code with example usage: obj.slice_helper(offset, size) and returns: slice,  slice, slice,  slice