class_docstr: Class for two-set partitions of sets.
  
  Two-set partitions of a smaller subset of :math:`\{0,...,n-1\}` are also allowed,
  where :math:`n` is a positive integer, which is not passed as an argument as it is
  nowhere needed.
  
  The parameters ``part1`` and ``part2`` are assigned to the attributes ``self.part1``
  and ``self.part2`` in a unique sorted way: the one that contains the smallest
  minimal value is assigned to ``self.part1`` for consistency.
  
  Parameters
  ----------
  part1 : iterable
      The first part of the split, an iterable that is a subset of
      :math:`\{0,\dots,n-1\}`. It may be empty, but must have empty intersection with
      ``part2``.
  part2 : iterable
      The second part of the split, an iterable that is a subset of
      :math:`\{0,\dots,n-1\}`. It may be empty, but must have empty intersection with
      ``part1``.
class_docstr_tok: ["Class","for","two-set","partitions","of","sets",".","Two-set","partitions","of","a","smaller","subset","of",":","math",":","`","\\","{","0",",","...",",","n-1\\","}","`","are","also","allowed",",","where",":","math",":","`","n","`","is","a","positive","integer",",","which","is","not","passed","as","an","argument","as","it","is","nowhere","needed",".","The","parameters","``","part1","``","and","``","part2","``","are","assigned","to","the","attributes","``","self.part1","``","and","``","self.part2","``","in","a","unique","sorted","way",":","the","one","that","contains","the","smallest","minimal","value","is","assigned","to","``","self.part1","``","for","consistency",".","Parameters","--","--","--","--","--","part1",":","iterable","The","first","part","of","the","split",",","an","iterable","that","is","a","subset","of",":","math",":","`","\\","{","0",",","\\dots",",","n-1\\","}","`",".","It","may","be","empty",",","but","must","have","empty","intersection","with","``","part2","``",".","part2",":","iterable","The","second","part","of","the","split",",","an","iterable","that","is","a","subset","of",":","math",":","`","\\","{","0",",","\\dots",",","n-1\\","}","`",".","It","may","be","empty",",","but","must","have","empty","intersection","with","``","part1","``","."]
docstr: Return the part of this split that is directed toward the other split.
  
  Each split contains part1 and part2, the parts that the corresponding edge in
  the graph splits the set of labels into. Thus, one can think of the split as an
  edge, where part1 points in the direction of the part of the tree where the
  labels of part1 are contained, and part2 points in the other direction.
  So, part1 points in the direction of ``other``, if it corresponds to an
  edge that is contained in the tree that part1 points to, else part2 points in
  the direction of ``split``.
  
  Parameters
  ----------
  other : Split
      The other split.
  
  Returns
  -------
  part_towards : iterable
      Return the part of the split ``self`` that points toward ``other_split``.
code: def get_part_towards(self, other):
      """Return the part of this split that is directed toward the other split.
  
      Each split contains part1 and part2, the parts that the corresponding edge in
      the graph splits the set of labels into. Thus, one can think of the split as an
      edge, where part1 points in the direction of the part of the tree where the
      labels of part1 are contained, and part2 points in the other direction.
      So, part1 points in the direction of ``other``, if it corresponds to an
      edge that is contained in the tree that part1 points to, else part2 points in
      the direction of ``split``.
  
      Parameters
      ----------
      other : Split
          The other split.
  
      Returns
      -------
      part_towards : iterable
          Return the part of the split ``self`` that points toward ``other_split``.
      """
      if other.part_contains(self.part1):
          return self.part2
      return self.part1
  
imports: import functools
  import itertools
  import geomstats.backend
  import geomstats.geometry.spd_matrices
  from geomstats.geometry.stratified.point_set import Point, PointSet, _vectorize_point
label_desc: Use image node_id 10 for calling the Split obj's underlying member method code with example usage: obj.get_part_towards(other) and returns: self, self