class_docstr: A class for interacting with CreateAutoMLJob API.
docstr: Defines the CompletionCriteria of an AutoMLJob.
  
  Args:
      max_candidates (int): the maximum number of candidates returned by an
          AutoML job.
      max_runtime_per_training_job_in_seconds (int): the maximum time of each
          training job in seconds.
      total_job_runtime_in_seconds (int): the total wait time of an AutoML job.
  
  Returns (dict): an AutoML CompletionCriteria.
docstr_tok: ["Defines","the","CompletionCriteria","of","an","AutoMLJob",".","Args",":","max_candidates","(","int",")",":","the","maximum","number","of","candidates","returned","by","an","AutoML","job",".","max_runtime_per_training_job_in_seconds","(","int",")",":","the","maximum","time","of","each","training","job","in","seconds",".","total_job_runtime_in_seconds","(","int",")",":","the","total","wait","time","of","an","AutoML","job",".","Returns","(","dict",")",":","an","AutoML","CompletionCriteria","."]
code: def _prepare_auto_ml_stop_condition(
      cls,
      max_candidates,
      max_runtime_per_training_job_in_seconds,
      total_job_runtime_in_seconds,
  ):
      """Defines the CompletionCriteria of an AutoMLJob.
  
      Args:
          max_candidates (int): the maximum number of candidates returned by an
              AutoML job.
          max_runtime_per_training_job_in_seconds (int): the maximum time of each
              training job in seconds.
          total_job_runtime_in_seconds (int): the total wait time of an AutoML job.
  
      Returns (dict): an AutoML CompletionCriteria.
      """
      stopping_condition = {}
  
      if max_candidates is not None:
          stopping_condition["MaxCandidates"] = max_candidates
      if max_runtime_per_training_job_in_seconds is not None:
          stopping_condition[
              "MaxRuntimePerTrainingJobInSeconds"
          ] = max_runtime_per_training_job_in_seconds
      if total_job_runtime_in_seconds is not None:
          stopping_condition[
              "MaxAutoMLJobRuntimeInSeconds"
          ] = total_job_runtime_in_seconds
  
      return stopping_condition
  
imports: from __future__ import absolute_import
  import logging
  from typing import Optional, List, Dict
  from six import string_types
  from sagemaker import Model, PipelineModel, s3
  from sagemaker.automl.candidate_estimator import CandidateEstimator
  from sagemaker.config import AUTO_ML_ROLE_ARN_PATH, AUTO_ML_KMS_KEY_ID_PATH, AUTO_ML_VPC_CONFIG_PATH, AUTO_ML_VOLUME_KMS_KEY_ID_PATH, AUTO_ML_INTER_CONTAINER_ENCRYPTION_PATH
  from sagemaker.job import _Job
  from sagemaker.session import Session
  from sagemaker.utils import name_from_base, resolve_value_from_config, format_tags, Tags
  from sagemaker.workflow.entities import PipelineVariable
  from sagemaker.workflow.pipeline_context import runnable_by_pipeline
label_desc: Use image node_id 6 for calling the AutoMLJob obj's underlying member method code with example usage: obj._prepare_auto_ml_stop_condition(cls, max_candidates, max_runtime_per_training_job_in_seconds, total_job_runtime_in_seconds) and returns: stopping_condition