class_docstr: The SageMaker Debugger rule base class that cannot be instantiated directly.
  
  .. tip::
  
      Debugger rule classes inheriting this RuleBase class are
      :class:`~sagemaker.debugger.Rule` and :class:`~sagemaker.debugger.ProfilerRule`.
      Do not directly use the rule base class to instantiate a SageMaker Debugger rule.
      Use the :class:`~sagemaker.debugger.Rule` classmethods for debugging
      and the :class:`~sagemaker.debugger.ProfilerRule` classmethods for profiling.
  
  Attributes:
      name (str): The name of the rule.
      image_uri (str): The image URI to use the rule.
      instance_type (str): Type of EC2 instance to use. For example, 'ml.c4.xlarge'.
      container_local_output_path (str): The local path to store the Rule output.
      s3_output_path (str): The location in S3 to store the output.
      volume_size_in_gb (int): Size in GB of the EBS volume to use for storing data.
      rule_parameters (dict): A dictionary of parameters for the rule.
class_docstr_tok: ["The","SageMaker","Debugger","rule","base","class","that","can","not","be","instantiated","directly",".","..","tip",":",":","Debugger","rule","classes","inheriting","this","RuleBase","class","are",":","class",":","`","~sagemaker.debugger.Rule","`","and",":","class",":","`","~sagemaker.debugger.ProfilerRule","`",".","Do","not","directly","use","the","rule","base","class","to","instantiate","a","SageMaker","Debugger","rule",".","Use","the",":","class",":","`","~sagemaker.debugger.Rule","`","classmethods","for","debugging","and","the",":","class",":","`","~sagemaker.debugger.ProfilerRule","`","classmethods","for","profiling",".","Attributes",":","name","(","str",")",":","The","name","of","the","rule",".","image_uri","(","str",")",":","The","image","URI","to","use","the","rule",".","instance_type","(","str",")",":","Type","of","EC2","instance","to","use",".","For","example",",","'ml.c4.xlarge","'",".","container_local_output_path","(","str",")",":","The","local","path","to","store","the","Rule","output",".","s3_output_path","(","str",")",":","The","location","in","S3","to","store","the","output",".","volume_size_in_gb","(","int",")",":","Size","in","GB","of","the","EBS","volume","to","use","for","storing","data",".","rule_parameters","(","dict",")",":","A","dictionary","of","parameters","for","the","rule","."]
docstr: Create a dictionary of rule parameters.
  
  Args:
      source (str): Optional. A source file containing a rule to invoke. If provided,
          you must also provide rule_to_invoke. This can either be an S3 uri or
          a local path.
      rule_to_invoke (str): Optional. The name of the rule to invoke within the source.
          If provided, you must also provide source.
      rule_parameters (dict): Optional. A dictionary of parameters for the rule.
  
  Returns:
      dict: A dictionary of rule parameters.
code: def _set_rule_parameters(source, rule_to_invoke, rule_parameters):
      """Create a dictionary of rule parameters.
  
      Args:
          source (str): Optional. A source file containing a rule to invoke. If provided,
              you must also provide rule_to_invoke. This can either be an S3 uri or
              a local path.
          rule_to_invoke (str): Optional. The name of the rule to invoke within the source.
              If provided, you must also provide source.
          rule_parameters (dict): Optional. A dictionary of parameters for the rule.
  
      Returns:
          dict: A dictionary of rule parameters.
  
      """
      if bool(source) ^ bool(rule_to_invoke):
          raise ValueError(
              "If you provide a source, you must also provide a rule to invoke (and vice versa)."
          )
  
      merged_rule_params = {}
      merged_rule_params.update(build_dict("source_s3_uri", source))
      merged_rule_params.update(
          build_dict("rule_to_invoke", rule_to_invoke)
      )
      merged_rule_params.update(rule_parameters or {})
  
      return merged_rule_params
  
imports: from __future__ import absolute_import
  from abc import ABC
  from typing import Union, Optional, List, Dict
  import attr
  import smdebug_rulesconfig
  from sagemaker import image_uris
  from sagemaker.utils import build_dict, name_from_base
  from sagemaker.workflow.entities import PipelineVariable
  from sagemaker.debugger.profiler_constants import DETAIL_PROF_PROCESSING_DEFAULT_INSTANCE_TYPE, DETAIL_PROF_PROCESSING_DEFAULT_VOLUME_SIZE
label_desc: Use image node_id 1 for calling the RuleBase obj's underlying member method code with example usage: obj._set_rule_parameters(source, rule_to_invoke, rule_parameters) and returns: merged_rule_params