class_docstr: A generator which tracks the min/max list length diffs for two paths.
class_docstr_tok: ["A","generator","which","tracks","the","min\/max","list","length","diffs","for","two","paths","."]
docstr: Initializes LengthDiffGenerator for a specific pair of paths.
  
  Args:
    left_path: The path whose list lengths should be treated as the left side
      of the difference (lengths(left_path) - lengths(right_path)).
    right_path: The path whose list lengths should be treated as the right
      side of the difference (lengths(left_path) - lengths(right_path)).
    required_paths: The set of paths which must all be non-null in order for a
      length diff at a given row to contribute to the min or max.
docstr_tok: ["Initializes","LengthDiffGenerator","for","a","specific","pair","of","paths",".","Args",":","left_path",":","The","path","whose","list","lengths","should","be","treated","as","the","left","side","of","the","difference","(","lengths","(","left_path",")","-","lengths","(","right_path",")",")",".","right_path",":","The","path","whose","list","lengths","should","be","treated","as","the","right","side","of","the","difference","(","lengths","(","left_path",")","-","lengths","(","right_path",")",")",".","required_paths",":","The","set","of","paths","which","must","all","be","non-null","in","order","for","a","length","diff","at","a","given","row","to","contribute","to","the","min","or","max","."]
code: def __init__(
      self,
      left_path: types.FeaturePath,
      right_path: types.FeaturePath,
      required_paths: Optional[Iterable[types.FeaturePath]] = None,
  ):
      """Initializes LengthDiffGenerator for a specific pair of paths.
  
      Args:
        left_path: The path whose list lengths should be treated as the left side
          of the difference (lengths(left_path) - lengths(right_path)).
        right_path: The path whose list lengths should be treated as the right
          side of the difference (lengths(left_path) - lengths(right_path)).
        required_paths: The set of paths which must all be non-null in order for a
          length diff at a given row to contribute to the min or max.
      """
      self._left_path = left_path
      self._right_path = right_path
      if required_paths:
          self._required_paths = tuple(sorted(required_paths))
      else:
          self._required_paths = None
  
file_path: data-validation/tensorflow_data_validation/statistics/generators/constituents/length_diff_generator.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  from tensorflow_data_validation import types
  from tensorflow_data_validation.statistics.generators import input_batch
  from tensorflow_data_validation.statistics.generators import stats_generator
  from typing import Iterable, Optional, Text, Tuple, Union
label_desc: Use image node_id 1 to create a new LengthDiffGenerator object from inherited base classes: stats_generator with example: obj = LengthDiffGenerator(left_path, right_path, required_paths)