code: def set_renderer():
      # Setup
      device = torch.device("cuda:0")
      torch.cuda.set_device(device)
  
      # Initialize an OpenGL perspective camera.
      R, T = look_at_view_transform(2.0, 0, 180)
      cameras = OpenGLOrthographicCameras(device=device, R=R, T=T)
  
      raster_settings = RasterizationSettings(
          image_size=512,
          blur_radius=0.0,
          faces_per_pixel=1,
          bin_size=None,
          max_faces_per_bin=None,
      )
  
      lights = PointLights(device=device, location=((2.0, 2.0, 2.0),))
  
      renderer = MeshRenderer(
          rasterizer=MeshRasterizer(
              cameras=cameras, raster_settings=raster_settings
          ),
          shader=HardPhongShader(
              device=device, cameras=cameras, lights=lights
          ),
      )
      return renderer
  
file_path: pifuhd/lib/colab_util.py
imports: import io
  import os
  import torch
  from skimage.io import imread
  import numpy
  import cv2
  from tqdm import tqdm_notebook
  import base64
  from IPython.display import HTML
  from pytorch3d.io import load_objs_as_meshes
  from IPython.display import HTML
  from base64 import b64encode
  from pytorch3d.structures import Meshes
  from pytorch3d.renderer import look_at_view_transform, OpenGLOrthographicCameras, PointLights, DirectionalLights, Materials, RasterizationSettings, MeshRenderer, MeshRasterizer, HardPhongShader, TexturesVertex
label_desc: Use image node_id 1 for calling a global function with example usage: set_renderer() and returns: renderer