def run_plugins(context_obj, boto3_clients):
  """
  Executes all loaded plugins designated for the service calling the function.

  Args:
    context_obj (obj:EFContext): The EFContext object created by the service.
    boto3_clients (dict): Dictionary of boto3 clients created by ef_utils.create_aws_clients()
  """

  def print_if_verbose(message):
    if context_obj.verbose:
      print(message)

  service_name = os.path.basename(sys.argv[0]).replace(".py", "")
  try:
    import plugins
  except ImportError:
    print_if_verbose("no plugins detected.")
    return
  else:
    for plugin_importer, plugin_name, plugin_ispkg in pkgutil.iter_modules(plugins.__path__):
      if plugin_ispkg:
        plugin_package = importlib.import_module("plugins.{}".format(plugin_name))
        for importer, modname, ispkg in pkgutil.iter_modules(plugin_package.__path__):
          plugin_module = importlib.import_module("plugins.{}.{}".format(plugin_name, modname))
          for name, obj in inspect.getmembers(plugin_module):
            if inspect.isclass(obj) and obj.__name__ == "EFPlugin":
              plugin_class = getattr(plugin_module, name)
              plugin_instance = plugin_class(context=context_obj, clients=boto3_clients)
              if plugin_instance.service == service_name:
                print_if_verbose("plugin '{}' loaded".format(plugin_name))
                if not context_obj.commit:
                  print_if_verbose("dryrun: skipping plugin execution.")
                else:
                  try:
                    plugin_instance.run()
                  except AttributeError:
                    print("error executing plugin '{}'".format(modname))
Executes all loaded plugins designated for the service calling the function.

  Args:
    context_obj (obj:EFContext): The EFContext object created by the service.
    boto3_clients (dict): Dictionary of boto3 clients created by ef_utils.create_aws_clients()