code: def F_batch_trilinear_interp3d(input_, coords):
      """
      input : torch.Tensor
          size = (N,H,W,C)
      coords : torch.Tensor
          size = (N,H*W*C,2)
      """
      x = torch.clamp(coords[:, :, 0], 0, input_.size(2) - 2)
      x0 = x.floor()
      x1 = x0 + 1
      y = torch.clamp(coords[:, :, 1], 0, input_.size(3) - 2)
      y0 = y.floor()
      y1 = y0 + 1
      z = torch.clamp(coords[:, :, 2], 0, input_.size(4) - 2)
      z0 = z.floor()
      z1 = z0 + 1
  
      stride = torch.LongTensor(input_.stride())
      x0_ix = x0.mul(stride[2]).long()
      x1_ix = x1.mul(stride[2]).long()
      y0_ix = y0.mul(stride[3]).long()
      y1_ix = y1.mul(stride[3]).long()
      z0_ix = z0.mul(stride[4]).long()
      z1_ix = z1.mul(stride[4]).long()
  
      input_flat = input_.contiguous().view(input_.size(0), -1)
  
      vals_000 = input_flat.gather(
          1, x0_ix.add(y0_ix).add(z0_ix).detach()
      )
      vals_100 = input_flat.gather(
          1, x1_ix.add(y0_ix).add(z0_ix).detach()
      )
      vals_010 = input_flat.gather(
          1, x0_ix.add(y1_ix).add(z0_ix).detach()
      )
      vals_001 = input_flat.gather(
          1, x0_ix.add(y0_ix).add(z1_ix).detach()
      )
      vals_101 = input_flat.gather(
          1, x1_ix.add(y0_ix).add(z1_ix).detach()
      )
      vals_011 = input_flat.gather(
          1, x0_ix.add(y1_ix).add(z1_ix).detach()
      )
      vals_110 = input_flat.gather(
          1, x1_ix.add(y1_ix).add(z0_ix).detach()
      )
      vals_111 = input_flat.gather(
          1, x1_ix.add(y1_ix).add(z1_ix).detach()
      )
  
      xd = x - x0
      yd = y - y0
      zd = z - z0
      xm = 1 - xd
      ym = 1 - yd
      zm = 1 - zd
  
      x_mapped = (
          vals_000.mul(xm).mul(ym).mul(zm)
          + vals_100.mul(xd).mul(ym).mul(zm)
          + vals_010.mul(xm).mul(yd).mul(zm)
          + vals_001.mul(xm).mul(ym).mul(zd)
          + vals_101.mul(xd).mul(ym).mul(zd)
          + vals_011.mul(xm).mul(yd).mul(zd)
          + vals_110.mul(xd).mul(yd).mul(zm)
          + vals_111.mul(xd).mul(yd).mul(zd)
      )
  
      return x_mapped.view_as(input_)
  
file_path: pywick/pywick/functions/affine.py
imports: import torch
  import torch.nn.functional
  from ..utils import th_iterproduct, th_flatten
label_desc: Use image node_id 8 for calling a global function with example usage: F_batch_trilinear_interp3d(input_, coords) and returns: x_mapped