docstr: Restores a sample image from given data string which contains
  hex-encoded pixels from the top left fourth of a sample.
docstr_tok: ["Restores","a","sample","image","from","given","data","string","which","contains","hex-encoded","pixels","from","the","top","left","fourth","of","a","sample","."]
code: def make_sample(self, data, size):
      """Restores a sample image from given data string which contains
      hex-encoded pixels from the top left fourth of a sample.
      """
      data = data.replace(" ", "")
      sample = Image.new("L", size)
      s_px = sample.load()
      w, h = size[0] // 2, size[1] // 2
      for y in range(h):
          for x in range(w):
              val = int(data[(y * w + x) * 2 : (y * w + x + 1) * 2], 16)
              s_px[x, y] = val
              s_px[size[0] - x - 1, size[1] - y - 1] = val
              s_px[x, size[1] - y - 1] = 255 - val
              s_px[size[0] - x - 1, y] = 255 - val
      return sample
  
imports: from contextlib import contextmanager
  import pytest
  from PIL import Image, ImageDraw
  from .helper import assert_image_equal, assert_image_similar, hopper, mark_if_feature_version
label_desc: Use image node_id 2 for calling the TestImagingCoreResampleAccuracy obj's underlying member method code with example usage: obj.make_sample(data, size) and returns: sample