code: def test_bad_import():
      from jina.logging.predefined import default_logger
  
      with pytest.raises(ModuleNotFoundError):
          with ImportExtensions(required=True, logger=default_logger):
              import abcdefg  # no install and unlist
  
      with pytest.raises(ModuleNotFoundError):
          with ImportExtensions(required=True, logger=default_logger):
              import ngt  # list but no install
  
      fake_tags = ["ngt", "index", "py37"]
      with ImportExtensions(
          required=False, logger=default_logger
      ) as ie:
          ie._tags = fake_tags
          import ngt
  
      assert ie._tags == fake_tags
  
      with ImportExtensions(
          required=False, logger=default_logger
      ) as ie:
          ie._tags = fake_tags
          import ngt.abc.edf
  
      assert ie._tags == fake_tags
  
      with ImportExtensions(
          required=False, logger=default_logger
      ) as ie:
          ie._tags = fake_tags
          from ngt.abc import edf
  
      assert ie._tags == fake_tags
  
      with ImportExtensions(
          required=False, logger=default_logger
      ) as ie:
          import abcdefg
  
      assert not ie._tags
  
imports: import pytest
  from jina.importer import ImportExtensions
  from jina.logging.predefined import default_logger
label_desc: Use image node_id 1 for calling a global function with example usage: test_bad_import() without return types