class_docstr: ResolverFunction represents a traceable function of resolver operators.
  
  Resolver function returns some form of channel depending on the function
  definition.
  
  It can return a single channel:
  
      trainer = Trainer(
          examples=latest_created(example_gen.outputs['examples']))
  
  or a dictionary of channels:
  
      k_fold_inputs = k_fold(example_gen.outputs['examples'], splits=5)
      trainer = Trainer(
          examples=k_fold_inputs['train'],
      )
      evaluator = Evaluator(
          examples=k_fold_inputs['eval'],
          model=trainer.outputs['model'],
      )
  
  or a ForEach-loopable channels:
  
    with ForEach(
        tfx.dsl.inputs.sequential_rolling_range(
            example_gens.outputs['examples'], n=3)) as train_window:
      trainer = Trainer(
          examples=train_window['examples'])
docstr: Decorator to register resolver function type inferrer.
  
  Usage:
    @resolver_function
    def latest(channel):
      ...
  
    @latest.output_type_inferrer
    def latest_type(channel):
      return channel.type
  
  Args:
    f: A type inference function to decorate.
  
  Returns:
    The given function.
docstr_tok: ["Decorator","to","register","resolver","function","type","inferrer",".","Usage",":","@","resolver_function","def","latest","(","channel",")",":","...","@","latest.output_type_inferrer","def","latest_type","(","channel",")",":","return","channel.type","Args",":","f",":","A","type","inference","function","to","decorate",".","Returns",":","The","given","function","."]
code: def output_type_inferrer(self, f: _TypeInferFn) -> _TypeInferFn:
      """Decorator to register resolver function type inferrer.
  
      Usage:
        @resolver_function
        def latest(channel):
          ...
  
        @latest.output_type_inferrer
        def latest_type(channel):
          return channel.type
  
      Args:
        f: A type inference function to decorate.
  
      Returns:
        The given function.
      """
      self._output_type_inferrer = f
      return f
  
imports: import contextlib
  import inspect
  from typing import Callable, Type, Union, Mapping, Any, Optional, Sequence, cast, overload
  from tfx.dsl.control_flow import for_each_internal
  from tfx.dsl.input_resolution import resolver_op
  from tfx.types import artifact
  from tfx.types import channel
  from tfx.types import resolved_channel
  from tfx.utils import doc_controls
  from tfx.utils import typing_utils
label_desc: Use image node_id 5 for calling the ResolverFunction obj's underlying member method code with example usage: obj.output_type_inferrer(f) and returns: f