code: def setUp(self):
      if self.file_obj:
          self.f = tempfile.TemporaryFile()
          self.file = self.f
      else:
          if self.format == "jpeg":
              suffix = ".jpg"
          else:
              suffix = "." + self.format
          self.f = tempfile.NamedTemporaryFile(
              suffix=suffix, delete=False
          )
          self.file = self.f.name
  
      if self.color:
          shape = (3,) + self.size
      else:
          shape = (1,) + self.size
  
      self.img = np.random.randint(0, 255, size=shape).astype(
          self.dtype
      )
  
file_path: chainercv/tests/utils_tests/image_tests/test_write_image.py
imports: import numpy
  from PIL import Image
  import tempfile
  import unittest
  from chainer import testing
  from chainercv.utils import write_image
label_desc: Use image node_id 1 for calling the TestWriteImage obj's underlying member method code with example usage: obj.setUp() without return types