code: def visualize(
      self,
      image_bgr: Image,
      outputs_boxes_xywh_classes: Tuple[
          Optional[DensePoseEmbeddingPredictorOutput],
          Optional[Boxes],
          Optional[List[int]],
      ],
  ) -> Image:
      image_target_bgr = image_bgr.copy()
      if outputs_boxes_xywh_classes[0] is None:
          return image_target_bgr
  
      (
          S,
          E,
          N,
          bboxes_xywh,
          pred_classes,
      ) = self.extract_and_check_outputs_and_boxes(
          outputs_boxes_xywh_classes
      )
  
      meshes = {
          p: create_mesh(self.class_to_mesh_name[p], self.device)
          for p in np.unique(pred_classes)
      }
  
      for n in range(N):
          x, y, w, h = bboxes_xywh[n].int().cpu().numpy()
          mesh_name = self.class_to_mesh_name[pred_classes[n]]
          closest_vertices, mask = get_closest_vertices_mask_from_ES(
              E[[n]],
              S[[n]],
              h,
              w,
              self.mesh_vertex_embeddings[mesh_name],
              self.device,
          )
          uv_array = (
              meshes[pred_classes[n]]
              .texcoords[closest_vertices]
              .permute((2, 0, 1))
          )
          uv_array = uv_array.cpu().numpy().clip(0, 1)
          textured_image = self.generate_image_with_texture(
              image_target_bgr[y : y + h, x : x + w],
              uv_array,
              mask.cpu().numpy(),
              self.class_to_mesh_name[pred_classes[n]],
          )
          if textured_image is None:
              continue
          image_target_bgr[y : y + h, x : x + w] = textured_image
  
      return image_target_bgr
  
imports: import json
  import numpy
  from functools import lru_cache
  from typing import Dict, List, Optional, Tuple
  import cv2
  import torch
  from detectron2.utils.file_io import PathManager
  from densepose.modeling import build_densepose_embedder
  from densepose.modeling.cse.utils import get_closest_vertices_mask_from_ES
  from ..data.utils import get_class_to_mesh_name_mapping
  from ..structures import DensePoseEmbeddingPredictorOutput
  from ..structures.mesh import create_mesh
  from .base import Boxes, Image, MatrixVisualizer
  from .densepose_results_textures import get_texture_atlas
label_desc: Use image node_id 2 for calling the DensePoseOutputsTextureVisualizer obj's underlying member method code with example usage: obj.visualize(image_bgr, outputs_boxes_xywh_classes) and returns: image_target_bgr, image_target_bgr