code: def _get_collate_function(
      conv_type, is_multiscale, pre_collate_transform=None
  ):
      is_dense = ConvolutionFormatFactory.check_is_dense_format(
          conv_type
      )
      if is_multiscale:
          if (
              conv_type.lower()
              == ConvolutionFormat.PARTIAL_DENSE.value.lower()
          ):
              fn = MultiScaleBatch.from_data_list
          else:
              raise NotImplementedError(
                  "MultiscaleTransform is activated and supported only for partial_dense format"
              )
      else:
          if is_dense:
              fn = SimpleBatch.from_data_list
          else:
              fn = torch_geometric.data.batch.Batch.from_data_list
      return partial(
          BaseDataset._collate_fn,
          collate_fn=fn,
          pre_collate_transform=pre_collate_transform,
      )
  
imports: import os
  from abc import ABC, abstractmethod
  import logging
  import functools
  from functools import partial
  import numpy
  import torch
  import torch_geometric
  from torch_geometric.transforms import Compose, FixedPoints
  import copy
  from torch_points3d.models import model_interface
  from torch_points3d.core.data_transform import instantiate_transforms, MultiScaleTransform
  from torch_points3d.core.data_transform import instantiate_filters
  from torch_points3d.datasets.batch import SimpleBatch
  from torch_points3d.datasets.multiscale_data import MultiScaleBatch
  from torch_points3d.utils.enums import ConvolutionFormat
  from torch_points3d.utils.config import ConvolutionFormatFactory
  from torch_points3d.utils.colors import COLORS, colored_print
label_desc: Use image node_id 6 for calling the BaseDataset obj's underlying member method code with example usage: obj._get_collate_function(conv_type, is_multiscale, pre_collate_transform) and returns: partial