code: def __init__(
      self,
      workflow,
      parent_modifier=None,
      globals=None,
      config=None,
      base_snakefile=None,
      skip_configfile=False,
      skip_validation=False,
      skip_global_report_caption=False,
      resolved_rulename_modifier=None,
      local_rulename_modifier=None,
      rule_whitelist=None,
      rule_exclude_list=None,
      ruleinfo_overwrite=None,
      allow_rule_overwrite=False,
      replace_prefix=None,
      prefix=None,
      replace_wrapper_tag=None,
      namespace=None,
      rule_proxies=None,
  ):
      if parent_modifier is not None:
          # init with values from parent modifier
          self.base_snakefile = parent_modifier.base_snakefile
          self.globals = parent_modifier.globals
          self.skip_configfile = parent_modifier.skip_configfile
          self.resolved_rulename_modifier = (
              parent_modifier.resolved_rulename_modifier
          )
          self.local_rulename_modifier = (
              parent_modifier.local_rulename_modifier
          )
          self.skip_validation = parent_modifier.skip_validation
          self.skip_global_report_caption = (
              parent_modifier.skip_global_report_caption
          )
          self.rule_whitelist = parent_modifier.rule_whitelist
          self.rule_exclude_list = parent_modifier.rule_exclude_list
          self.ruleinfo_overwrite = parent_modifier.ruleinfo_overwrite
          self.allow_rule_overwrite = (
              parent_modifier.allow_rule_overwrite
          )
          self.path_modifier = parent_modifier.path_modifier
          self.replace_wrapper_tag = parent_modifier.replace_wrapper_tag
          self.namespace = parent_modifier.namespace
          self.wildcard_constraints = (
              parent_modifier.wildcard_constraints
          )
          self.rules = parent_modifier.rules
          self.rule_proxies = parent_modifier.rule_proxies
      else:
          # default settings for globals if not inheriting from parent
          self.globals = (
              globals
              if globals is not None
              else dict(workflow.vanilla_globals)
          )
          self.wildcard_constraints = dict()
          self.rules = set()
          self.rule_proxies = rule_proxies or Rules()
          self.globals["rules"] = self.rule_proxies
  
      self.workflow = workflow
      self.base_snakefile = base_snakefile
  
      if config is not None:
          self.globals["config"] = config
  
      self.skip_configfile = skip_configfile
      self.resolved_rulename_modifier = resolved_rulename_modifier
      self.local_rulename_modifier = local_rulename_modifier
      self.skip_validation = skip_validation
      self.skip_global_report_caption = skip_global_report_caption
      self.rule_whitelist = rule_whitelist
      self.rule_exclude_list = rule_exclude_list
      self.ruleinfo_overwrite = ruleinfo_overwrite
      self.allow_rule_overwrite = allow_rule_overwrite
      self.path_modifier = PathModifier(
          replace_prefix, prefix, workflow
      )
      self.replace_wrapper_tag = replace_wrapper_tag
      self.namespace = namespace
  
imports: from pathlib import Path
  import types
  import re
  from snakemake.common import Rules
  from snakemake.exceptions import WorkflowError
  from snakemake.path_modifier import PathModifier
  from snakemake import wrapper
label_desc: Use image node_id 1 to create a new WorkflowModifier object  with example: obj = WorkflowModifier(workflow, parent_modifier, globals, config, base_snakefile, skip_configfile, skip_validation, skip_global_report_caption, resolved_rulename_modifier, local_rulename_modifier, rule_whitelist, rule_exclude_list, ruleinfo_overwrite, allow_rule_overwrite, replace_prefix, prefix, replace_wrapper_tag, namespace, rule_proxies)