code: def _resolve_container_command_line(
      cmd_args: Optional[List[placeholders.CommandlineArgumentType]],
      input_dict: Dict[str, List[types.Artifact]],
      output_dict: Dict[str, List[types.Artifact]],
      exec_properties: Dict[str, Any],
  ) -> List[str]:
      """Resolves placeholders in the command line of a container.
  
      Args:
        cmd_args: command line args to resolve.
        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:
        Resolved command line.
      """
  
      def expand_command_line_arg(
          cmd_arg: placeholders.CommandlineArgumentType,
      ) -> str:
          """Resolves a single argument."""
          if isinstance(cmd_arg, str):
              return cmd_arg
          elif isinstance(cmd_arg, placeholders.InputValuePlaceholder):
              if cmd_arg.input_name in exec_properties:
                  return str(exec_properties[cmd_arg.input_name])
              else:
                  artifact = input_dict[cmd_arg.input_name][0]
                  return str(artifact.value)
          elif isinstance(cmd_arg, placeholders.InputUriPlaceholder):
              return input_dict[cmd_arg.input_name][0].uri
          elif isinstance(cmd_arg, placeholders.OutputUriPlaceholder):
              return output_dict[cmd_arg.output_name][0].uri
          elif isinstance(cmd_arg, placeholders.ConcatPlaceholder):
              resolved_items = [
                  expand_command_line_arg(item)
                  for item in cmd_arg.items
              ]
              for item in resolved_items:
                  if not isinstance(item, str):
                      raise TypeError(
                          'Expanded item "{}" has incorrect type "{}"'.format(
                              item, type(item)
                          )
                      )
              return "".join(resolved_items)
          else:
              raise TypeError(
                  (
                      'Unsupported type of command-line arguments: "{}".'
                      " Supported types are {}."
                  ).format(
                      type(cmd_arg),
                      str(executor_specs.CommandlineArgumentType),
                  )
              )
  
      resolved_command_line = []
      for cmd_arg in cmd_args or []:
          resolved_cmd_arg = expand_command_line_arg(cmd_arg)
          if not isinstance(resolved_cmd_arg, str):
              raise TypeError(
                  'Resolved argument "{}" (type="{}") is not a string.'.format(
                      resolved_cmd_arg, type(resolved_cmd_arg)
                  )
              )
          resolved_command_line.append(resolved_cmd_arg)
  
      return resolved_command_line
  
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 4 for calling a global function with example usage: _resolve_container_command_line(cmd_args, input_dict, output_dict, exec_properties) and returns: resolved_command_line, cmd_arg, str, str, input_dict, output_dict, str