code: def render_sets(
      dataset: ModelParams,
      iteration: int,
      pipeline: PipelineParams,
      skip_train: bool,
      skip_test: bool,
  ):
      with torch.no_grad():
          gaussians = GaussianModel(dataset.sh_degree)
          scene = Scene(
              dataset,
              gaussians,
              load_iteration=iteration,
              shuffle=False,
          )
  
          bg_color = (
              [1, 1, 1] if dataset.white_background else [0, 0, 0]
          )
          background = torch.tensor(
              bg_color, dtype=torch.float32, device="cuda"
          )
  
          if not skip_train:
              render_set(
                  dataset.model_path,
                  "train",
                  scene.loaded_iter,
                  scene.getTrainCameras(),
                  gaussians,
                  pipeline,
                  background,
              )
  
          if not skip_test:
              render_set(
                  dataset.model_path,
                  "test",
                  scene.loaded_iter,
                  scene.getTestCameras(),
                  gaussians,
                  pipeline,
                  background,
              )
  
file_path: gaussian-splatting/render.py
imports: import torch
  from scene import Scene
  import os
  from tqdm import tqdm
  from os import makedirs
  from gaussian_renderer import render
  import torchvision
  from utils.general_utils import safe_state
  from argparse import ArgumentParser
  from arguments import ModelParams, PipelineParams, get_combined_args
  from gaussian_renderer import GaussianModel
label_desc: Use image node_id 2 for calling a global function with example usage: render_sets(dataset, iteration, pipeline, skip_train, skip_test) without return types