code: def add_ones(query_points, x, add_one):
      if add_one:
          ones = (
              torch.ones(query_points.shape[0], dtype=torch.float)
              .unsqueeze(-1)
              .to(query_points.device)
          )
          if x is not None:
              x = torch.cat([ones.to(x.dtype), x], dim=-1)
          else:
              x = ones
      return x
  
file_path: torch-points3d/torch_points3d/modules/KPConv/kernels.py
imports: import torch
  from torch.nn.parameter import Parameter
  from .kernel_utils import kernel_point_optimization_debug, load_kernels
  from .losses import fitting_loss, repulsion_loss, permissive_loss
  from .convolution_ops import *
  from torch_points3d.models.base_model import BaseInternalLossModule
label_desc: Use image node_id 1 for calling a global function with example usage: add_ones(query_points, x, add_one) and returns: x