code: def generate_image_with_texture(
      self, bbox_image_bgr, uv_array, mask, mesh_name
  ):
      alpha = self.alpha_dict.get(mesh_name)
      texture_image = self.texture_image_dict.get(mesh_name)
      if alpha is None or texture_image is None:
          return None
      U, V = uv_array
      x_index = (U * texture_image.shape[1]).astype(int)
      y_index = (V * texture_image.shape[0]).astype(int)
      local_texture = texture_image[y_index, x_index][mask]
      local_alpha = np.expand_dims(alpha[y_index, x_index][mask], -1)
      output_image = bbox_image_bgr.copy()
      output_image[mask] = (
          output_image[mask] * (1 - local_alpha)
          + local_texture * local_alpha
      )
      return output_image.astype(np.uint8)
  
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 DensePoseOutputsTextureVisualizer obj's underlying member method code with example usage: obj.generate_image_with_texture(bbox_image_bgr, uv_array, mask, mesh_name) and returns: output_image, None