code: def refiner(
      self,
      params: SamplingParams,
      image,
      prompt: str,
      negative_prompt: Optional[str] = None,
      samples: int = 1,
      return_latents: bool = False,
  ):
      sampler = get_sampler_config(params)
      value_dict = {
          "orig_width": image.shape[3] * 8,
          "orig_height": image.shape[2] * 8,
          "target_width": image.shape[3] * 8,
          "target_height": image.shape[2] * 8,
          "prompt": prompt,
          "negative_prompt": negative_prompt,
          "crop_coords_top": 0,
          "crop_coords_left": 0,
          "aesthetic_score": 6.0,
          "negative_aesthetic_score": 2.5,
      }
  
      return do_img2img(
          image,
          self.model,
          sampler,
          value_dict,
          samples,
          skip_encode=True,
          return_latents=return_latents,
          filter=None,
      )
  
imports: import pathlib
  from dataclasses import asdict, dataclass
  from enum import Enum
  from typing import Optional
  from omegaconf import OmegaConf
  from sgm.inference.helpers import Img2ImgDiscretizationWrapper, do_img2img, do_sample
  from sgm.modules.diffusionmodules.sampling import DPMPP2MSampler, DPMPP2SAncestralSampler, EulerAncestralSampler, EulerEDMSampler, HeunEDMSampler, LinearMultistepSampler
  from sgm.util import load_model_from_config
label_desc: Use image node_id 5 for calling the SamplingPipeline obj's underlying member method code with example usage: obj.refiner(params, image, prompt, negative_prompt, samples, return_latents) and returns: do_img2img