code: def extract_and_check_outputs_and_boxes(
      self, outputs_boxes_xywh_classes
  ):
      (
          densepose_output,
          bboxes_xywh,
          pred_classes,
      ) = outputs_boxes_xywh_classes
  
      if pred_classes is None:
          pred_classes = [self.default_class] * len(bboxes_xywh)
  
      assert isinstance(
          densepose_output, DensePoseEmbeddingPredictorOutput
      ), "DensePoseEmbeddingPredictorOutput expected, {} encountered".format(
          type(densepose_output)
      )
  
      S = densepose_output.coarse_segm
      E = densepose_output.embedding
      N = S.size(0)
      assert N == E.size(0), (
          "CSE coarse_segm {} and embeddings {}"
          " should have equal first dim size".format(S.size(), E.size())
      )
      assert N == len(bboxes_xywh), (
          "number of bounding boxes {}"
          " should be equal to first dim size of outputs {}".format(
              len(bboxes_xywh), N
          )
      )
      assert N == len(pred_classes), (
          "number of predicted classes {}"
          " should be equal to first dim size of outputs {}".format(
              len(bboxes_xywh), N
          )
      )
  
      return S, E, N, bboxes_xywh, pred_classes
  
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 3 for calling the DensePoseOutputsVertexVisualizer obj's underlying member method code with example usage: obj.extract_and_check_outputs_and_boxes(outputs_boxes_xywh_classes) and returns: S,  E,  N,  bboxes_xywh,  pred_classes