original_docstring: 
      Generate and enqueue the tiles that need to be processed.
      
docstring: Generate and enqueue the tiles that need to be processed.
docstring_tokens: Generate and enqueue the tiles that need to be processed .
code: def _mp_tile_worker(queue, pio, reproject_function, kwargs):
      """
      Generate and enqueue the tiles that need to be processed.
      """
      from queue import Empty
  
      invert_into_tiles = pio.get_default_vertical_parity_sign() == 1
  
      while True:
          try:
              # un-pickling WCS objects always triggers warnings right now
              with warnings.catch_warnings():
                  warnings.simplefilter('ignore')
                  image, desc, wcs_out_indiv = queue.get(True, timeout=1)
          except (OSError, ValueError, Empty):
              # OSError or ValueError => queue closed. This signal seems not to
              # cross multiprocess lines, though.
              break
  
          shape_out_indiv = (desc.jmax - desc.jmin, desc.imax - desc.imin)
  
          array = reproject_function(
              (image.asarray(), image.wcs),
              output_projection=wcs_out_indiv,
              shape_out=shape_out_indiv,
              return_footprint=False,
              **kwargs
          )
  
          image = Image.from_array(array.astype(np.float32))
  
          for pos, width, height, image_x, image_y, tile_x, tile_y in desc.sub_tiling.generate_populated_positions():
              if invert_into_tiles:
                  flip_tile_y1 = 255 - tile_y
                  flip_tile_y0 = flip_tile_y1 - height
  
                  if flip_tile_y0 == -1:
                      flip_tile_y0 = None  # with a slice, -1 does the wrong thing
  
                  by_idx = slice(flip_tile_y1, flip_tile_y0, -1)
              else:
                  by_idx = slice(tile_y, tile_y + height)
  
              iy_idx = slice(image_y, image_y + height)
              ix_idx = slice(image_x, image_x + width)
              bx_idx = slice(tile_x, tile_x + width)
  
              with pio.update_image(pos, masked_mode=image.mode, default='masked') as basis:
                  image.update_into_maskable_buffer(basis, iy_idx, ix_idx, by_idx, bx_idx)
code_tokens: def _mp_tile_worker ( queue , pio , reproject_function , kwargs ) : from queue import Empty invert_into_tiles = pio . get_default_vertical_parity_sign ( ) == 1 while True : try : with warnings . catch_warnings ( ) : warnings . simplefilter ( 'ignore' ) image , desc , wcs_out_indiv = queue . get ( True , timeout = 1 ) except ( OSError , ValueError , Empty ) : break shape_out_indiv = ( desc . jmax - desc . jmin , desc . imax - desc . imin ) array = reproject_function ( ( image . asarray ( ) , image . wcs ) , output_projection = wcs_out_indiv , shape_out = shape_out_indiv , return_footprint = False , ** kwargs ) image = Image . from_array ( array . astype ( np . float32 ) ) for pos , width , height , image_x , image_y , tile_x , tile_y in desc . sub_tiling . generate_populated_positions ( ) : if invert_into_tiles : flip_tile_y1 = 255 - tile_y flip_tile_y0 = flip_tile_y1 - height if flip_tile_y0 == - 1 : flip_tile_y0 = None by_idx = slice ( flip_tile_y1 , flip_tile_y0 , - 1 ) else : by_idx = slice ( tile_y , tile_y + height ) iy_idx = slice ( image_y , image_y + height ) ix_idx = slice ( image_x , image_x + width ) bx_idx = slice ( tile_x , tile_x + width ) with pio . update_image ( pos , masked_mode = image . mode , default = 'masked' ) as basis : image . update_into_maskable_buffer ( basis , iy_idx , ix_idx , by_idx , bx_idx )
short_docstring: Generate and enqueue the tiles that need to be processed.
short_docstring_tokens: Generate and enqueue the tiles that need to be processed .
comment: """
      Generate and enqueue the tiles that need to be processed.
      """$SEP$# un-pickling WCS objects always triggers warnings right now$SEP$# OSError or ValueError => queue closed. This signal seems not to$SEP$# cross multiprocess lines, though.$SEP$# with a slice, -1 does the wrong thing