code: def do_upscale(self, img, path):
      if not self.enable:
          return img
  
      try:
          info = self.load_model(path)
      except Exception:
          errors.report(
              f"Unable to load RealESRGAN model {path}", exc_info=True
          )
          return img
  
      upsampler = RealESRGANer(
          scale=info.scale,
          model_path=info.local_data_path,
          model=info.model(),
          half=not cmd_opts.no_half and not cmd_opts.upcast_sampling,
          tile=opts.ESRGAN_tile,
          tile_pad=opts.ESRGAN_tile_overlap,
          device=self.device,
      )
  
      upsampled = upsampler.enhance(np.array(img), outscale=info.scale)[
          0
      ]
  
      image = Image.fromarray(upsampled)
      return image
  
file_path: stable-diffusion-webui/modules/realesrgan_model.py
imports: import os
  import numpy
  from PIL import Image
  from realesrgan import RealESRGANer
  from modules.upscaler import Upscaler, UpscalerData
  from modules.shared import cmd_opts, opts
  from modules import modelloader, errors
label_desc: Use image node_id 2 for calling the UpscalerRealESRGAN obj's underlying member method code with example usage: obj.do_upscale(img, path) and returns: image, img, img