code: def test_try_import_is_successful_other_error() -> None:
      with pytest.raises(NotImplementedError):
          with try_import() as imports:
              raise NotImplementedError
      assert (
          imports.is_successful()
      )  # No imports failed so `imports` is successful.
      imports.check()
  
imports: import pytest
  from optuna._imports import try_import
label_desc: Use image node_id 2 for calling a global function with example usage: test_try_import_is_successful_other_error() without return types