code: def test_check_optional_dependency(self):
      small_text.base.OPTIONAL_DEPENDENCIES[
          "not_installed"
      ] = "module_name_for_not_installed"
  
      with self.assertRaisesRegex(
          MissingOptionalDependencyError,
          "The optional dependency 'not_installed' is required",
      ) as context:
          check_optional_dependency("not_installed")
  
      self.assertEqual(MissingOptionalDependencyError, context.expected)
  
file_path: small-text/tests/unit/small_text/test_base.py
imports: import unittest
  import small_text
  from small_text.base import check_optional_dependency
  from small_text.exceptions import MissingOptionalDependencyError
label_desc: Use image node_id 1 for calling the OptionalDependenciesTest obj's underlying member method code with example usage: obj.test_check_optional_dependency() without return types