Guard a block of code to suppress ImportErrorsA context manager to temporarily suppress ImportErrors. Use this to attempt imports without failing immediately on missing modules. Example:
Copy
with optional_import_block(): <br/> import some_module import some_other_module