code: def latest_version(artifacts, n: int = 1):
      """Returns the n latest version artifacts, ties broken by artifact id.
  
      Args:
        artifacts: The artifacts to filter.
        n: The number of latest artifacts to return, must be > 0.
  
      Returns:
        The n latest artifacts.
      """
      return ops.LatestVersion(artifacts, n=n)
  
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 2 for calling a global function with example usage: latest_version(artifacts, n) and returns: ops