class_docstr: LatestCreateTime operator.
class_docstr_tok: ["LatestCreateTime","operator","."]
docstr: Returns the n latest createst artifacts, ties broken by artifact id.
docstr_tok: ["Returns","the","n","latest","createst","artifacts",",","ties","broken","by","artifact","id","."]
code: def apply(
      self, input_list: Sequence[types.Artifact]
  ) -> Sequence[types.Artifact]:
      """Returns the n latest createst artifacts, ties broken by artifact id."""
      if not input_list:
          return []
  
      if self.n < 1:
          raise ValueError(f"n must be > 0, but was set to {self.n}.")
  
      # Sorts outputs by create time in ascending order.
      input_list.sort(  # pytype: disable=attribute-error
          key=lambda a: (a.mlmd_artifact.create_time_since_epoch, a.id)
      )
      return input_list[-self.n :]
  
imports: from typing import Sequence
  from tfx import types
  from tfx.dsl.input_resolution import resolver_op
label_desc: Use image node_id 1 for calling the LatestCreateTime obj's underlying member method code with example usage: obj.apply(input_list) and returns: input_list, list