code: def SparseConv3d(
      architecture: str = None,
      input_nc: int = None,
      num_layers: int = None,
      config: DictConfig = None,
      backend: str = "minkowski",
      *args,
      **kwargs,
  ):
      """Create a Sparse Conv backbone model based on architecture proposed in
       https://arxiv.org/abs/1904.08755
  
       Two backends are available at the moment:
           - https://github.com/mit-han-lab/torchsparse
           - https://github.com/NVIDIA/MinkowskiEngine
  
       Parameters
       ----------
       architecture : str, optional
           Architecture of the model, choose from unet, encoder and decoder
       input_nc : int, optional
           Number of channels for the input
      output_nc : int, optional
           If specified, then we add a fully connected head at the end of the network to provide the requested dimension
       num_layers : int, optional
           Depth of the network
       config : DictConfig, optional
           Custom config, overrides the num_layers and architecture parameters
       block:
           Type of resnet block, ResBlock by default but can be any of the blocks in modules/SparseConv3d/modules.py
       backend:
           torchsparse or minkowski
      """
      if "SPARSE_BACKEND" in os.environ and sp3d.nn.backend_valid(
          os.environ["SPARSE_BACKEND"]
      ):
          sp3d.nn.set_backend(os.environ["SPARSE_BACKEND"])
      else:
          sp3d.nn.set_backend(backend)
  
      factory = SparseConv3dFactory(
          architecture=architecture,
          num_layers=num_layers,
          input_nc=input_nc,
          config=config,
          **kwargs,
      )
      return factory.build()
  
imports: import os
  import sys
  from omegaconf import DictConfig, OmegaConf
  import logging
  import torch
  from torch_geometric.data import Batch
  from torch_points3d.applications.modelfactory import ModelFactory
  import torch_points3d.modules.SparseConv3d
  from torch_points3d.core.base_conv.message_passing import *
  from torch_points3d.modules.SparseConv3d.modules import *
  from torch_points3d.core.base_conv.partial_dense import *
  from torch_points3d.models.base_architectures.unet import UnwrappedUnetBasedModel
  from torch_points3d.core.common_modules.base_modules import MLP
  from .utils import extract_output_nc
label_desc: Use image node_id 1 for calling a global function with example usage: SparseConv3d(architecture, input_nc, num_layers, config, backend) and returns: factory