code: def _ensure_no_missing_nodes(
      nodes: Sequence[node_proto_view.NodeProtoView],
      from_nodes: Optional[Collection[str]] = None,
      to_nodes: Optional[Collection[str]] = None,
  ):
      """Raises ValueError if there are from_nodes/to_nodes not in the pipeline."""
      all_node_ids = set(node.node_info.id for node in nodes)
      missing_nodes = (
          set(from_nodes or []) | set(to_nodes or [])
      ) - all_node_ids
      if missing_nodes:
          raise ValueError(
              f"Nodes {sorted(missing_nodes)} specified in from_nodes/to_nodes "
              f"are not present in the pipeline. Valid nodes are {all_node_ids}."
          )
  
imports: import collections
  import concurrent.futures
  import enum
  from typing import Collection, Dict, Final, List, Mapping, Optional, OrderedDict, Sequence, Set, Tuple
  import uuid
  from absl import logging
  from tfx.dsl.compiler import compiler_utils
  from tfx.dsl.compiler import constants
  from tfx.orchestration import metadata
  from tfx.orchestration import node_proto_view
  from tfx.orchestration.portable import execution_publish_utils
  from tfx.orchestration.portable.mlmd import context_lib
  from tfx.orchestration.portable.mlmd import execution_lib
  from tfx.proto.orchestration import pipeline_pb2
  from ml_metadata.proto import metadata_store_pb2
label_desc: Use image node_id 11 for calling a global function with example usage: _ensure_no_missing_nodes(nodes, from_nodes, to_nodes) without return types