docstr: This function create and set the transform to the obj as attributes
          
docstr_tok: ["This","function","create","and","set","the","transform","to","the","obj","as","attributes"]
code: def set_transform(obj, dataset_opt):
      """This function create and set the transform to the obj as attributes"""
      obj.pre_transform = None
      obj.test_transform = None
      obj.train_transform = None
      obj.val_transform = None
      obj.inference_transform = None
  
      for key_name in dataset_opt.keys():
          if "transform" in key_name:
              new_name = key_name.replace("transforms", "transform")
              try:
                  transform = instantiate_transforms(
                      getattr(dataset_opt, key_name)
                  )
              except Exception:
                  log.exception(
                      "Error trying to create {}, {}".format(
                          new_name, getattr(dataset_opt, key_name)
                      )
                  )
                  continue
              setattr(obj, new_name, transform)
  
      inference_transform = explode_transform(obj.pre_transform)
      inference_transform += explode_transform(obj.test_transform)
      obj.inference_transform = (
          Compose(inference_transform)
          if len(inference_transform) > 0
          else None
      )
  
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 3 for calling the BaseDataset obj's underlying member method code with example usage: obj.set_transform(obj, dataset_opt) without return types