code: def densify_and_prune(
      self, max_grad, min_opacity, extent, max_screen_size
  ):
      grads = self.xyz_gradient_accum / self.denom
      grads[grads.isnan()] = 0.0
  
      self.densify_and_clone(grads, max_grad, extent)
      self.densify_and_split(grads, max_grad, extent)
  
      prune_mask = (self.get_opacity < min_opacity).squeeze()
      if max_screen_size:
          big_points_vs = self.max_radii2D > max_screen_size
          big_points_ws = (
              self.get_scaling.max(dim=1).values > 0.1 * extent
          )
          prune_mask = torch.logical_or(
              torch.logical_or(prune_mask, big_points_vs), big_points_ws
          )
      self.prune_points(prune_mask)
  
      torch.cuda.empty_cache()
  
imports: import torch
  import numpy
  from utils.general_utils import inverse_sigmoid, get_expon_lr_func, build_rotation
  from torch import nn
  import os
  from utils.system_utils import mkdir_p
  from plyfile import PlyData, PlyElement
  from utils.sh_utils import RGB2SH
  from simple_knn._C import distCUDA2
  from utils.graphics_utils import BasicPointCloud
  from utils.general_utils import strip_symmetric, build_scaling_rotation
label_desc: Use image node_id 26 for calling the GaussianModel obj's underlying member method code with example usage: obj.densify_and_prune(max_grad, min_opacity, extent, max_screen_size) without return types