code: def skip_if_no_optuna(obj):
      """
      Skip the unit tests if torch.cuda.is_available is False.
      """
      return unittest.skipUnless(has_optuna, "Skipping optuna tests")(
          obj
      )
  
imports: from __future__ import annotations
  import os
  import tempfile
  import unittest
  from functools import partial
  import nibabel
  import numpy
  import torch
  from monai.apps.auto3dseg import BundleGen, DataAnalyzer, NNIGen, OptunaGen, import_bundle_algo_history
  from monai.bundle.config_parser import ConfigParser
  from monai.data import create_test_image_3d
  from monai.utils import optional_import
  from monai.utils.enums import AlgoKeys
  from tests.utils import SkipIfBeforePyTorchVersion, get_testing_algo_template_path, skip_if_downloading_fails, skip_if_no_cuda
label_desc: Use image node_id 1 for calling a global function with example usage: skip_if_no_optuna(obj) and returns: unittest