docstr: Process perturbed result and save.
  
  Args:
  save_name: sticker saving name.
  pic_in_numpy_0_255: numpy array with value within (0,255) for saving.
docstr_tok: ["Process","perturbed","result","and","save",".","Args",":","save_name",":","sticker","saving","name",".","pic_in_numpy_0_255",":","numpy","array","with","value","within","(","0,255",")","for","saving","."]
code: def _generate_sticker(
      self,
      save_name,
      pic_in_numpy_0_255,
      logo_mask=None,
      resized_logo_mask=None,
  ):
      """
      Process perturbed result and save.
  
      Args:
      save_name: sticker saving name.
      pic_in_numpy_0_255: numpy array with value within (0,255) for saving.
      """
      is_saved = None
  
      _object = self.mask_list[0]
      xmin, ymin, xmax, ymax = self._get_mask_coordination(_object)
      print((xmin, ymin, xmax, ymax))
  
      sticker_in_numpy_0_255_original = pic_in_numpy_0_255[
          ymin:ymax, xmin:xmax
      ]
  
      if logo_mask is not None and resized_logo_mask is not None:
          resize_ratio = old_div(
              logo_mask.shape[0], resized_logo_mask.shape[0]
          )
      else:
          resize_ratio = 6  # empirically...
  
      new_sticker_width = int(
          sticker_in_numpy_0_255_original.shape[1] * resize_ratio
      )
      new_sticker_height = int(
          sticker_in_numpy_0_255_original.shape[0] * resize_ratio
      )
      new_sticker = cv2.resize(
          sticker_in_numpy_0_255_original,
          (new_sticker_width, new_sticker_height),
      )
  
      if logo_mask is not None and resized_logo_mask is not None:
          ad_area_center_x = old_div(new_sticker_width, 2)
          ad_area_center_y = old_div(new_sticker_height, 2)
  
          # cv2.resize only eats integer
          resized_height = logo_mask.shape[0]
          resized_width = logo_mask.shape[1]
  
          paste_xmin = int(ad_area_center_x - old_div(resized_width, 2))
          paste_ymin = int(
              ad_area_center_y - old_div(resized_height, 2)
          )
          paste_xmax = paste_xmin + resized_width
          paste_ymax = paste_ymin + resized_height
  
          for i in range(paste_xmin, paste_xmax):
              for j in range(paste_ymin, paste_ymax):
                  if (
                      logo_mask[j - paste_ymin, i - paste_xmin, 0]
                      == self.very_small
                  ):
                      new_sticker[j, i] = 255
  
      assert new_sticker is not None
      is_saved = cv2.imwrite(self.path + save_name, new_sticker)
      if is_saved:
          print(("Sticker saved under:", self.path + save_name))
      else:
          print("Sticker saving error")
  
      return is_saved
  
imports: from __future__ import division
  from __future__ import print_function
  from builtins import input
  from builtins import range
  from builtins import object
  from past.utils import old_div
  from abc import ABCMeta
  from abc import abstractmethod
  import numpy
  import cv2
  import os
  import xmltodict
  import pdb
  from future.utils import with_metaclass
label_desc: Use image node_id 13 for calling the ODD_logic obj's underlying member method code with example usage: obj._generate_sticker(save_name, pic_in_numpy_0_255, logo_mask, resized_logo_mask) and returns: is_saved