Create a definition for executing a pipeline of containers as part of a SageMaker model.
    Args:
        models (list[sagemaker.Model]): this will be a list of ``sagemaker.Model`` objects in the order the inference
        should be invoked.
        instance_type (str): The EC2 instance type to deploy this Model to. For example, 'ml.p2.xlarge' (default: None).
    Returns:
        list[dict[str, str]]: list of container definition objects usable with with the CreateModel API for inference
        pipelines if passed via `Containers` field.

def pipeline_container_def(models, instance_type=None):
    """
    Create a definition for executing a pipeline of containers as part of a SageMaker model.
    Args:
        models (list[sagemaker.Model]): this will be a list of ``sagemaker.Model`` objects in the order the inference
        should be invoked.
        instance_type (str): The EC2 instance type to deploy this Model to. For example, 'ml.p2.xlarge' (default: None).
    Returns:
        list[dict[str, str]]: list of container definition objects usable with with the CreateModel API for inference
        pipelines if passed via `Containers` field.
    """
    c_defs = []  # should contain list of container definitions in the same order customer passed
    for model in models:
        c_defs.append(model.prepare_container_def(instance_type))
    return c_defs