code: def test_get_by_name(self):
      dataset_opt = MockDatasetConfig()
      setattr(
          dataset_opt, "dataroot", os.path.join(DIR, "temp_dataset")
      )
  
      mock_base_dataset = MockBaseDataset(dataset_opt)
      mock_base_dataset.test_dataset = [MockDataset(), MockDataset()]
      mock_base_dataset.train_dataset = MockDataset()
      mock_base_dataset.val_dataset = MockDataset()
  
      for name in ["train", "val", "test_0", "test_1"]:
          self.assertEqual(
              mock_base_dataset.get_dataset(name).name, name
          )
  
      test_with_name = MockDataset()
      setattr(test_with_name, "name", "testos")
      mock_base_dataset.test_dataset = test_with_name
      with self.assertRaises(ValueError):
          mock_base_dataset.get_dataset("test_1")
      mock_base_dataset.get_dataset("testos")
  
      with self.assertRaises(ValueError):
          mock_base_dataset.test_dataset = [
              test_with_name,
              test_with_name,
          ]
  
imports: import unittest
  from omegaconf import DictConfig, OmegaConf
  import os
  import sys
  from glob import glob
  import torch
  import numpy
  from torch_geometric.data.data import Data
  import torch_geometric.transforms
  from test.mockdatasets import MockDataset, MockDatasetConfig
  from test.mock_models import MockModel, MockModelConfig
  from torch_points3d.datasets.base_dataset import BaseDataset
  from torch_points3d.models.model_factory import instantiate_model
  from torch_points3d.utils.model_building_utils.model_definition_resolver import resolve_model
  from torch_points3d.utils.enums import ConvolutionFormat
  import torch_points3d.core.data_transform
label_desc: Use image node_id 5 for calling the TestDataset obj's underlying member method code with example usage: obj.test_get_by_name() without return types