code: def save(out_path, scene_name, pc_name, data, feature):
      """
      save pointcloud, feature and keypoint if it is asked
      """
  
      kp = None
      # it must contain keypoints
      if hasattr(data, "keypoints"):
          kp = data.keypoints
      else:
          kp = None
      out_dir = osp.join(out_path, scene_name)
      if not osp.exists(out_dir):
          os.makedirs(out_dir)
      out_file = osp.join(out_dir, pc_name.split(".")[0] + "_desc.npz")
      if hasattr(data, "pos_x"):
          pcd = torch.stack(
              (data.pos_x, data.pos_y, data.pos_z)
          ).T.numpy()
      else:
          pcd = data.pos.numpy()
      np.savez(out_file, pcd=pcd, feat=feature, keypoints=kp)
  
file_path: torch-points3d/scripts/test_registration_scripts/save_feature.py
imports: import open3d
  import torch
  import hydra
  import logging
  from omegaconf import OmegaConf
  import os
  import os.path
  import sys
  import numpy
  from torch_points3d.datasets.dataset_factory import instantiate_dataset, get_dataset_class
  from torch_points3d.models.model_factory import instantiate_model
  from torch_points3d.models.base_model import BaseModel
  from torch_points3d.datasets.base_dataset import BaseDataset
  from torch_points3d.metrics.colored_tqdm import Coloredtqdm
  from torch_points3d.metrics.model_checkpoint import ModelCheckpoint
  from torch_points3d.utils.colors import COLORS
label_desc: Use image node_id 1 for calling a global function with example usage: save(out_path, scene_name, pc_name, data, feature) without return types