code: def _infer_latest_pipeline_run_type(
      pipeline, output_keys: Sequence[str] = ()
  ):
      """Output type inferrer of resolver function latest_pipeline_run_outputs.
  
      Args:
        pipeline: The pipeline producing the artifacts.
        output_keys: (Optional) A list of output keys. If provided, only the
          artifacts of the key in this list will return by this function, otherwise,
          all available output keys of the producer pipeline will be used.
  
      Returns:
        A Dict: key is output key, value is output type.
      """
      if not output_keys:
          output_keys = list(pipeline.outputs)
      return {
          output_key: channel.type
          for output_key, channel in pipeline.outputs.items()
          if output_key in output_keys
      }
  
imports: from typing import Optional, Sequence, Union
  from absl import logging
  from tfx.dsl.input_resolution import resolver_function
  from tfx.dsl.input_resolution.ops import ops
  from tfx.types import artifact
  from tfx.types import channel
label_desc: Use image node_id 8 for calling a global function with example usage: _infer_latest_pipeline_run_type(pipeline, output_keys) and returns: unknown