code: def add_plugin(self, name: str, entry_points: str, init: str):
      plugin = self.tmp_path / name
      plugin.mkdir(mode=0o777)
      plugin_egg = plugin.with_suffix(".egg-info")
      plugin_egg.mkdir(mode=0o777)
  
      (plugin_egg / "entry_points.txt").write_text(entry_points)
      (plugin / "__init__.py").write_text(init)
  
      # also fix pkg_resources since it already has loaded old packages in other tests.
      working_set = pkg_resources.WorkingSet([str(self.tmp_path)])
      self.monkeypatch.setattr(
          pkg_resources,
          "iter_entry_points",
          working_set.iter_entry_points,
      )
  
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 2 for calling the PluginCreator obj's underlying member method code with example usage: obj.add_plugin(name, entry_points, init) without return types