code: def _gen_fig_with_subplots(
      batch_size: int, ncols: int, subplot_titles: List[str]
  ):  # pragma: no cover
      """
      Takes in the number of objects to be plotted and generate a plotly figure
      with the appropriate number and orientation of titled subplots.
      Args:
          batch_size: the number of elements in the batch of objects to be visualized.
          ncols: number of subplots in the same row.
          subplot_titles: titles for the subplot(s). list of strings of length batch_size.
  
      Returns:
          Plotly figure with ncols subplots per row, and batch_size subplots.
      """
      fig_rows = batch_size // ncols
      if batch_size % ncols != 0:
          fig_rows += 1  # allow for non-uniform rows
      fig_cols = ncols
      fig_type = [{"type": "scene"}]
      specs = [fig_type * fig_cols] * fig_rows
      # subplot_titles must have one title per subplot
      fig = make_subplots(
          rows=fig_rows,
          cols=fig_cols,
          specs=specs,
          subplot_titles=subplot_titles,
          column_widths=[1.0] * fig_cols,
      )
      return fig
  
imports: import warnings
  from typing import Dict, List, NamedTuple, Optional, Tuple, Union
  import plotly.graph_objects
  import torch
  from plotly.subplots import make_subplots
  from pytorch3d.renderer import HeterogeneousRayBundle, ray_bundle_to_ray_points, RayBundle, TexturesAtlas, TexturesVertex
  from pytorch3d.renderer.camera_utils import camera_to_eye_at_up
  from pytorch3d.renderer.cameras import CamerasBase
  from pytorch3d.structures import join_meshes_as_scene, Meshes, Pointclouds
label_desc: Use image node_id 12 for calling a global function with example usage: _gen_fig_with_subplots(batch_size, ncols, subplot_titles) and returns: fig