class_docstr: SkipIfLessThanNSpans operator.
docstr: Raises a SkipSignal if the artifacts have less than n unique spans.
  
  For example, if the artifacts have spans [1, 3, 6, 7, 8] but n = 7, then a
  SkipSignal will be raised.
  
  Corresponds to min_spans in the TFX RangeConfig proto.
  
  Args:
    input_list: The artifacts to check.
  
  Returns:
    The same artifacts passed in, unmodified.
  
  Raises:
    SkipSignal if the artifacts have less than n unique spans.
docstr_tok: ["Raises","a","SkipSignal","if","the","artifacts","have","less","than","n","unique","spans",".","For","example",",","if","the","artifacts","have","spans","[","1",",","3",",","6",",","7",",","8","]","but","n","=","7",",","then","a","SkipSignal","will","be","raised",".","Corresponds","to","min_spans","in","the","TFX","RangeConfig","proto",".","Args",":","input_list",":","The","artifacts","to","check",".","Returns",":","The","same","artifacts","passed","in",",","unmodified",".","Raises",":","SkipSignal","if","the","artifacts","have","less","than","n","unique","spans","."]
code: def apply(
      self,
      input_list: Sequence[types.Artifact],
  ) -> Sequence[types.Artifact]:
      """Raises a SkipSignal if the artifacts have less than n unique spans.
  
      For example, if the artifacts have spans [1, 3, 6, 7, 8] but n = 7, then a
      SkipSignal will be raised.
  
      Corresponds to min_spans in the TFX RangeConfig proto.
  
      Args:
        input_list: The artifacts to check.
  
      Returns:
        The same artifacts passed in, unmodified.
  
      Raises:
        SkipSignal if the artifacts have less than n unique spans.
      """
      spans = set()
      for artifact in input_list:
          spans.add(artifact.span)
  
      if self.n >= 0 and len(spans) < self.n:
          raise exceptions.SkipSignal(
              f"[SkipIfLessThanNSpans] len(spans): {len(spans)} < N: {self.n}, "
              "skipping."
          )
  
      return input_list
  
imports: from typing import Sequence
  from tfx import types
  from tfx.dsl.input_resolution import resolver_op
  from tfx.orchestration.portable.input_resolution import exceptions
label_desc: Use image node_id 1 for calling the SkipIfLessThanNSpans obj's underlying member method code with example usage: obj.apply(input_list) and returns: input_list