def _prepare_init_params_from_job_description(cls, job_details, model_channel_name=None):
        """Convert the job description to init params that can be handled by the class constructor

        Args:
            job_details: the returned job details from a describe_training_job API call.
            model_channel_name (str): Name of the channel where pre-trained model data will be downloaded.

        Returns:
             dictionary: The transformed init_params

        """
        init_params = dict()

        init_params['role'] = job_details['RoleArn']
        init_params['train_instance_count'] = job_details['ResourceConfig']['InstanceCount']
        init_params['train_instance_type'] = job_details['ResourceConfig']['InstanceType']
        init_params['train_volume_size'] = job_details['ResourceConfig']['VolumeSizeInGB']
        init_params['train_max_run'] = job_details['StoppingCondition']['MaxRuntimeInSeconds']
        init_params['input_mode'] = job_details['AlgorithmSpecification']['TrainingInputMode']
        init_params['base_job_name'] = job_details['TrainingJobName']
        init_params['output_path'] = job_details['OutputDataConfig']['S3OutputPath']
        init_params['output_kms_key'] = job_details['OutputDataConfig']['KmsKeyId']

        has_hps = 'HyperParameters' in job_details
        init_params['hyperparameters'] = job_details['HyperParameters'] if has_hps else {}

        if 'TrainingImage' in job_details['AlgorithmSpecification']:
            init_params['image'] = job_details['AlgorithmSpecification']['TrainingImage']
        elif 'AlgorithmName' in job_details['AlgorithmSpecification']:
            init_params['algorithm_arn'] = job_details['AlgorithmSpecification']['AlgorithmName']
        else:
            raise RuntimeError('Invalid AlgorithmSpecification. Either TrainingImage or '
                               'AlgorithmName is expected. None was found.')

        if 'MetricDefinitons' in job_details['AlgorithmSpecification']:
            init_params['metric_definitions'] = job_details['AlgorithmSpecification']['MetricsDefinition']

        if 'EnableInterContainerTrafficEncryption' in job_details:
            init_params['encrypt_inter_container_traffic'] = \
                job_details['EnableInterContainerTrafficEncryption']

        subnets, security_group_ids = vpc_utils.from_dict(job_details.get(vpc_utils.VPC_CONFIG_KEY))
        if subnets:
            init_params['subnets'] = subnets
        if security_group_ids:
            init_params['security_group_ids'] = security_group_ids

        if 'InputDataConfig' in job_details and model_channel_name:
            for channel in job_details['InputDataConfig']:
                if channel['ChannelName'] == model_channel_name:
                    init_params['model_channel_name'] = model_channel_name
                    init_params['model_uri'] = channel['DataSource']['S3DataSource']['S3Uri']
                    break

        return init_params
Convert the job description to init params that can be handled by the class constructor

        Args:
            job_details: the returned job details from a describe_training_job API call.
            model_channel_name (str): Name of the channel where pre-trained model data will be downloaded.

        Returns:
             dictionary: The transformed init_params