code: def test_skip_bad_plugin(
      caplog, plugin_creator: PluginCreator
  ) -> None:
      caplog.set_level(logging.WARNING, logger="submitit")
      plugin_creator.add_plugin(
          "submitit_bad",
          entry_points="""[submitit]
  executor = submitit_bad:NonExisitingExecutor
  job_environment = submitit_bad:BadEnvironment
  unsupported_key = submitit_bad:SomethingElse
  """,
          init="""
  import submitit
  
  class BadEnvironment:
      name = "bad"
  
      def __init__(self):
          raise Exception("this is a bad environment")
  """,
      )
  
      executors = plugins.get_executors().keys()
      assert {"slurm", "local", "debug"} == set(executors)
      assert "bad" not in executors
      expected = [
          (
              logging.ERROR,
              r"'submitit_bad'.*no attribute 'NonExisitingExecutor'",
          ),
          (logging.ERROR, r"'submitit_bad'.*this is a bad environment"),
          (
              logging.WARNING,
              "unsupported_key = submitit_bad:SomethingElse",
          ),
      ]
      assert len(caplog.records) == len(expected)
      for record, ex_record in zip(caplog.records, expected):
          assert record.name == "submitit"
          assert record.levelno == ex_record[0]
          assert re.search(ex_record[1], record.getMessage())
  
imports: import logging
  import re
  import typing
  from pathlib import Path
  import pkg_resources
  import pytest
  from .None import core, plugins
  from .job_environment import JobEnvironment
label_desc: Use image node_id 10 for calling a global function with example usage: test_skip_bad_plugin(caplog, plugin_creator) without return types