docstr: Helper function to detach and clone the verts/faces.
  This is needed in order to set up the tensors for
  gradient computation in different tests.
docstr_tok: ["Helper","function","to","detach","and","clone","the","verts\/faces",".","This","is","needed","in","order","to","set","up","the","tensors","for","gradient","computation","in","different","tests","."]
code: def _clone_mesh(verts0, faces0, device, batch_size):
      """
      Helper function to detach and clone the verts/faces.
      This is needed in order to set up the tensors for
      gradient computation in different tests.
      """
      verts = verts0.detach().clone()
      verts.requires_grad = True
      meshes = Meshes(verts=[verts], faces=[faces0])
      meshes = meshes.to(device).extend(batch_size)
      return verts, meshes
  
imports: import re
  import unittest
  from itertools import product
  import numpy
  import torch
  from PIL import Image
  from pytorch3d.io import load_obj
  from pytorch3d.renderer import BlendParams, FoVPerspectiveCameras, look_at_view_transform, Materials, MeshRasterizer, MeshRenderer, PointLights, RasterizationSettings, SoftPhongShader, SplatterPhongShader, TexturesUV
  from pytorch3d.renderer.mesh.rasterize_meshes import rasterize_meshes, rasterize_meshes_python
  from pytorch3d.renderer.mesh.rasterizer import Fragments
  from pytorch3d.renderer.opengl import MeshRasterizerOpenGL
  from pytorch3d.renderer.points import AlphaCompositor, PointsRasterizationSettings, PointsRasterizer, PointsRenderer
  from pytorch3d.renderer.points.rasterize_points import rasterize_points, rasterize_points_python
  from pytorch3d.renderer.points.rasterizer import PointFragments
  from pytorch3d.structures import Meshes, Pointclouds
  from pytorch3d.transforms.transform3d import Transform3d
  from pytorch3d.utils import torus
  from .common_testing import get_pytorch3d_dir, get_tests_dir, load_rgb_image, TestCaseMixin
label_desc: Use image node_id 1 for calling the TestRasterizeRectangleImagesMeshes obj's underlying member method code with example usage: obj._clone_mesh(verts0, faces0, device, batch_size) and returns: verts,  meshes