docstr: Return a string to add to self.exec_job that includes additional
  arguments from the command line. This is currently used in the
  ClusterExecutor and CPUExecutor, as both were using the same
  code. Both have base class of the RealExecutor.
docstr_tok: ["Return","a","string","to","add","to","self.exec_job","that","includes","additional","arguments","from","the","command","line",".","This","is","currently","used","in","the","ClusterExecutor","and","CPUExecutor",",","as","both","were","using","the","same","code",".","Both","have","base","class","of","the","RealExecutor","."]
code: def general_args(
      self,
      pass_default_storage_provider_args: bool = True,
      pass_default_resources_args: bool = False,
      pass_group_args: bool = False,
  ) -> str:
      """Return a string to add to self.exec_job that includes additional
      arguments from the command line. This is currently used in the
      ClusterExecutor and CPUExecutor, as both were using the same
      code. Both have base class of the RealExecutor.
      """
      w2a = self.workflow_property_to_arg
  
      shared_deployment = (
          SharedFSUsage.SOFTWARE_DEPLOYMENT
          in self.workflow.storage_settings.shared_fs_usage
      )
  
      args = [
          "--force",
          "--target-files-omit-workdir-adjustment",
          "--keep-storage-local-copies",
          "--max-inventory-time 0",
          "--nocolor",
          "--notemp",
          "--no-hooks",
          "--nolock",
          "--ignore-incomplete",
          w2a("execution_settings.keep_incomplete"),
          w2a("output_settings.verbose"),
          w2a("rerun_triggers"),
          w2a(
              "execution_settings.cleanup_scripts",
              invert=True,
              flag="--skip-script-cleanup",
          ),
          w2a("execution_settings.shadow_prefix"),
          w2a("deployment_settings.deployment_method"),
          w2a("deployment_settings.conda_frontend"),
          w2a("deployment_settings.conda_prefix"),
          w2a(
              "conda_base_path",
              skip=not shared_deployment,
          ),
          w2a("deployment_settings.apptainer_prefix"),
          w2a("deployment_settings.apptainer_args"),
          w2a("resource_settings.max_threads"),
          self.get_shared_fs_usage_arg(),
          w2a(
              "execution_settings.keep_metadata",
              flag="--drop-metadata",
              invert=True,
          ),
          w2a("workflow_settings.wrapper_prefix"),
          w2a(
              "resource_settings.overwrite_threads",
              flag="--set-threads",
          ),
          w2a(
              "resource_settings.overwrite_scatter",
              flag="--set-scatter",
          ),
          w2a(
              "deployment_settings.conda_not_block_search_path_envvars"
          ),
          w2a("overwrite_configfiles", flag="--configfiles"),
          w2a("config_settings.config_args", flag="--config"),
          w2a("output_settings.printshellcmds"),
          w2a("execution_settings.latency_wait"),
          w2a("scheduling_settings.scheduler", flag="--scheduler"),
          format_cli_arg(
              "--scheduler-solver-path",
              os.path.dirname(sys.executable),
              skip=not shared_deployment,
          ),
          w2a(
              "overwrite_workdir",
              flag="--directory",
              skip=self.workflow.storage_settings.assume_common_workdir,
          ),
          self.get_set_resources_args(),
          self.get_resource_scopes_args(),
      ]
      args.extend(self.get_storage_provider_args())
      if pass_default_storage_provider_args:
          args.append(self.get_default_storage_provider_args())
      if pass_default_resources_args:
          args.append(
              w2a("resource_settings.default_resources", attr="args")
          )
      if pass_group_args:
          args.append(self.get_group_args())
  
      return join_cli_args(args)
  
imports: from dataclasses import dataclass, fields
  import hashlib
  import os
  import sys
  from typing import Mapping, TypeVar, TYPE_CHECKING, Any
  from snakemake_interface_executor_plugins.utils import format_cli_arg, join_cli_args
  from snakemake_interface_storage_plugins.registry import StoragePluginRegistry
  from snakemake import common
  from snakemake.settings import SharedFSUsage
label_desc: Use image node_id 12 for calling the SpawnedJobArgsFactory obj's underlying member method code with example usage: obj.general_args(pass_default_storage_provider_args, pass_default_resources_args, pass_group_args) and returns: join_cli_args