code: def build_nerf(opt):
      pos_pe = Embedder(
          opt.raw_pos_dim,
          opt.pos_max_freq,
          opt.pos_N_freqs,
          opt.log_sampling,
          opt.include_input,
          min_freq=opt.pos_min_freq,
          mapping=opt.posenc if hasattr(opt, "posenc") else "posenc",
      )
  
      dir_pe = Embedder(
          opt.raw_dir_dim,
          opt.dir_max_freq,
          opt.dir_N_freqs,
          opt.log_sampling,
          opt.include_input,
          mapping=opt.posenc if hasattr(opt, "posenc") else "posenc",
      )
  
      coarse_net = NeRF(
          depth=opt.nerf_depth,
          width=opt.nerf_width,
          input_ch=pos_pe.out_dim,
          input_ch_views=dir_pe.out_dim,
          use_viewdirs=opt.use_viewdirs,
      )
  
      fine_net = NeRF(
          depth=opt.nerf_depth,
          width=opt.nerf_width,
          input_ch=pos_pe.out_dim,
          input_ch_views=dir_pe.out_dim,
          use_viewdirs=opt.use_viewdirs,
      )
  
      coarse_net = Joiner(pos_pe, dir_pe, coarse_net)
      fine_net = Joiner(pos_pe, dir_pe, fine_net)
  
      if opt.use_cuda:
          coarse_net = coarse_net.cuda()
          fine_net = fine_net.cuda()
      return coarse_net, fine_net
  
imports: import torch
  import torch.nn
  import torch.nn.functional
  import numpy
label_desc: Use image node_id 3 for calling a global function with example usage: build_nerf(opt) and returns: coarse_net,  fine_net