code: def resolve_dynamic_parameters(
      node_parameters: pipeline_pb2.NodeParameters,
      context: placeholder_utils.ResolutionContext,
  ) -> Dict[str, types.ExecPropertyTypes]:
      """Resolves dynamic execution properties given the context.
  
      Args:
        node_parameters: The spec to get parameters.
        context: Contextual information for resolving placeholders.
  
      Returns:
        A Dict of resolved dynamic parameters.
  
      Raises:
        InputResolutionError: If the resolution of dynamic exec property fails.
      """
      result = {}
      for key, value in node_parameters.parameters.items():
          if value.HasField("placeholder"):
              try:
                  resolved_val = (
                      placeholder_utils.resolve_placeholder_expression(
                          value.placeholder, context
                      )
                  )
                  if resolved_val is None:
                      raise exceptions.InvalidArgument(
                          f"Cannot find input artifact to resolve dynamic exec property. "
                          f"Key: {key}. "
                          f"Value: {placeholder_utils.debug_str(value.placeholder)}"
                      )
                  result[key] = resolved_val
              except Exception as e:
                  raise exceptions.InvalidArgument(
                      f"Failed to resolve dynamic exec property. Key: {key}. "
                      f"Value: {placeholder_utils.debug_str(value.placeholder)}"
                  ) from e
  
      return result
  
imports: from typing import Dict, Sequence, Union
  from absl import logging
  from tfx import types
  from tfx.dsl.compiler import placeholder_utils
  from tfx.orchestration import mlmd_connection_manager
  from tfx.orchestration.portable.input_resolution import exceptions
  from tfx.orchestration.portable.input_resolution import node_inputs_resolver
  from tfx.proto.orchestration import pipeline_pb2
  from tfx.utils import typing_utils
label_desc: Use image node_id 4 for calling a global function with example usage: resolve_dynamic_parameters(node_parameters, context) and returns: result