code: def _filter_conditionals(
      artifact_maps: List[typing_utils.ArtifactMultiDict],
      conditionals: Mapping[str, pipeline_pb2.NodeInputs.Conditional],
  ) -> List[typing_utils.ArtifactMultiDict]:
      """Filter artifact maps by conditionals."""
      result = []
      for artifact_map in artifact_maps:
          context = placeholder_utils.ResolutionContext(
              exec_info=data_types.ExecutionInfo(
                  input_dict=artifact_map
              )
          )
          for cond_id, cond in conditionals.items():
              ok = placeholder_utils.resolve_placeholder_expression(
                  cond.placeholder_expression, context
              )
              if not isinstance(ok, bool):
                  raise exceptions.FailedPreconditionError(
                      f"Invalid conditional expression for {cond_id}; "
                      f"Expected boolean type but got {type(ok)} type."
                  )
              if not ok:
                  break
          else:
              result.append(artifact_map)
      return result
  
imports: import collections
  from typing import Dict, Iterable, List, Mapping, Sequence, Tuple, TypeVar
  from tfx import types
  from tfx.dsl.compiler import placeholder_utils
  from tfx.orchestration import metadata
  from tfx.orchestration import mlmd_connection_manager
  from tfx.orchestration.portable import data_types
  from tfx.orchestration.portable.input_resolution import exceptions
  from tfx.orchestration.portable.input_resolution import input_graph_resolver
  from tfx.orchestration.portable.input_resolution import partition_utils
  from tfx.orchestration.portable.input_resolution import channel_resolver
  from tfx.proto.orchestration import pipeline_pb2
  from tfx.types import artifact_utils
  from tfx.utils import topsort
  from tfx.utils import typing_utils
  from tfx.utils import governance_utils
label_desc: Use image node_id 10 for calling a global function with example usage: _filter_conditionals(artifact_maps, conditionals) and returns: result