code: def resolve_container_template(
      container_spec_tmpl: Union[
          executor_spec.ExecutorContainerSpec,
          executor_specs.TemplatedExecutorContainerSpec,
      ],
      input_dict: Dict[str, List[types.Artifact]],
      output_dict: Dict[str, List[types.Artifact]],
      exec_properties: Dict[str, Any],
  ) -> executor_spec.ExecutorContainerSpec:
      """Resolves Jinja2 template languages from an executor container spec.
  
      Args:
        container_spec_tmpl: the container spec template to be resolved.
        input_dict: Dictionary of input artifacts consumed by this component.
        output_dict: Dictionary of output artifacts produced by this component.
        exec_properties: Dictionary of execution properties.
  
      Returns:
        A resolved container spec.
      """
      context = {
          "input_dict": input_dict,
          "output_dict": output_dict,
          "exec_properties": exec_properties,
      }
      if isinstance(
          container_spec_tmpl,
          executor_specs.TemplatedExecutorContainerSpec,
      ):
          return executor_spec.ExecutorContainerSpec(
              image=container_spec_tmpl.image,
              command=_resolve_container_command_line(
                  cmd_args=container_spec_tmpl.command,
                  input_dict=input_dict,
                  output_dict=output_dict,
                  exec_properties=exec_properties,
              ),
          )
      return executor_spec.ExecutorContainerSpec(
          image=_render_text(container_spec_tmpl.image, context),
          command=_render_items(container_spec_tmpl.command, context),
          args=_render_items(container_spec_tmpl.args, context),
      )
  
file_path: tfx/tfx/orchestration/launcher/container_common.py
imports: from typing import Any, Dict, List, Optional, Union
  import jinja2
  from tfx import types
  from tfx.dsl.component.experimental import executor_specs
  from tfx.dsl.component.experimental import placeholders
  from tfx.dsl.components.base import executor_spec
label_desc: Use image node_id 1 for calling a global function with example usage: resolve_container_template(container_spec_tmpl, input_dict, output_dict, exec_properties) and returns: executor_spec, executor_spec