code: def visualize(
      self,
      image_bgr: Image,
      outputs_boxes_xywh_classes: Tuple[
          Optional[DensePoseEmbeddingPredictorOutput],
          Optional[Boxes],
          Optional[List[int]],
      ],
  ) -> Image:
      if outputs_boxes_xywh_classes[0] is None:
          return image_bgr
  
      (
          S,
          E,
          N,
          bboxes_xywh,
          pred_classes,
      ) = self.extract_and_check_outputs_and_boxes(
          outputs_boxes_xywh_classes
      )
  
      for n in range(N):
          x, y, w, h = bboxes_xywh[n].int().tolist()
          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,
          )
          embed_map = get_xyz_vertex_embedding(mesh_name, self.device)
          vis = (
              (embed_map[closest_vertices].clip(0, 1) * 255.0)
              .cpu()
              .numpy()
          )
          mask_numpy = mask.cpu().numpy().astype(dtype=np.uint8)
          image_bgr = self.mask_visualizer.visualize(
              image_bgr, mask_numpy, vis, [x, y, w, h]
          )
  
      return image_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 DensePoseOutputsVertexVisualizer obj's underlying member method code with example usage: obj.visualize(image_bgr, outputs_boxes_xywh_classes) and returns: image_bgr, image_bgr