code: def _add_current_spec_input_to_previous_spec_output(
      current_spec: execution_spec.ExecutionSpec,
      previous_spec: execution_spec.ExecutionSpec,
  ) -> None:
      for input_name in current_spec.input_names:
          if input_name in _get_non_input_names(previous_spec.subgraph):
              # Output names is a set, which doesn't allow duplicates.
              previous_spec.output_names.add(input_name)
  
imports: import collections
  from typing import Dict, List, Mapping, Set
  import tensorflow
  from tfx.dsl.io import fileio
  from tfx.experimental.distributed_inference.graphdef_experiments.subgraph_partitioning import execution_spec
label_desc: Use image node_id 19 for calling a global function with example usage: _add_current_spec_input_to_previous_spec_output(current_spec, previous_spec) without return types