class_docstr: Handle creating, starting and waiting for Amazon SageMaker jobs to finish.
  
  This class shouldn't be directly instantiated.
  
  Subclasses must define a way to create, start and wait for an Amazon
  SageMaker job.
class_docstr_tok: ["Handle","creating",",","starting","and","waiting","for","Amazon","SageMaker","jobs","to","finish",".","This","class","should","n't","be","directly","instantiated",".","Subclasses","must","define","a","way","to","create",",","start","and","wait","for","an","Amazon","SageMaker","job","."]
docstr: Placeholder docstring
docstr_tok: ["Placeholder","docstring"]
code: def _prepare_resource_config(
      instance_count,
      instance_type,
      instance_groups,
      volume_size,
      volume_kms_key,
      keep_alive_period_in_seconds,
  ):
      """Placeholder docstring"""
      resource_config = {
          "VolumeSizeInGB": volume_size,
      }
      if volume_kms_key is not None:
          resource_config["VolumeKmsKeyId"] = volume_kms_key
      if keep_alive_period_in_seconds is not None:
          resource_config[
              "KeepAlivePeriodInSeconds"
          ] = keep_alive_period_in_seconds
      if instance_groups is not None:
          if instance_count is not None or instance_type is not None:
              raise ValueError(
                  "instance_count and instance_type cannot be set when instance_groups is set"
              )
  
          resource_config["InstanceGroups"] = [
              group._to_request_dict() for group in instance_groups
          ]
      else:
          if instance_count is None or instance_type is None:
              raise ValueError(
                  "instance_count and instance_type must be set if instance_groups is not set"
              )
          resource_config["InstanceCount"] = instance_count
          resource_config["InstanceType"] = instance_type
  
      return resource_config
  
imports: from __future__ import absolute_import
  from abc import abstractmethod
  from six import string_types
  from sagemaker.inputs import FileSystemInput, TrainingInput
  from sagemaker.local import file_input
  from sagemaker.workflow import is_pipeline_variable
label_desc: Use image node_id 14 for calling the _Job obj's underlying member method code with example usage: obj._prepare_resource_config(instance_count, instance_type, instance_groups, volume_size, volume_kms_key, keep_alive_period_in_seconds) and returns: resource_config