class_docstr: Context manager to handle optional dependencies
  
  It will catch any import errors occurring inside the with-clause and
  keep a reference to the error so it can be reraised latter on.
  
  Use import_optional.ensure() to verify the extra dependency is correctly installed,
  otherwise it will raise the previously caught ImportError.
  
  Parameters
  ----------
  package: str
      Name of the package (ex: algorithm or executor)
  extra_dependency: str, optional
      Name of the extra dependency to be installed.
      Will be used in the error string to guide installation of the
      extra package as ``pip install orion[extra_dependency]``.
      If not defined, will be ``package.lower()``
code: def __init__(
      self, package: str, extra_dependency: str = None
  ) -> None:
      self.package = package
      if extra_dependency is None:
          extra_dependency = package.lower()
      self.extra_dependency = extra_dependency
  
      self.import_error: None | ImportError = None
  
file_path: orion/src/orion/core/utils/module_import.py
imports: from __future__ import annotations
  import os
label_desc: Use image node_id 1 to create a new ImportOptional object  with example: obj = ImportOptional(package, extra_dependency)