class_docstr: The disjoint set is represented with an list <n> of integers where
  <n[i]> is the parent of the node at position <i>.
  If <n[i]> = <i>, <i> it's a root, or a head, of a set
docstr: Get the root element of the set containing <a>
docstr_tok: ["Get","the","root","element","of","the","set","containing","<","a",">"]
code: def find_set(self, node):
      """
      Get the root element of the set containing <a>
      """
      if self.parent[node] != node:
          # Very important, memoize result of the
          # recursion in the list to optimize next
          # calls and make this operation practically constant, O(1)
          self.parent[node] = self.find_set(self.parent[node])
  
      # node <a> it's the set root, so we can return that index
      return self.parent[node]
  
file_path: keon-algos/algorithms/graph/minimum_spanning_tree.py
imports: import sys
label_desc: Use image node_id 3 for calling the DisjointSet obj's underlying member method code with example usage: obj.find_set(node) and returns: self