code: def threeSum(self, nums: List[int]) -> List[List[int]]:
      res, dups = set(), set()
      seen = {}
      for i, val1 in enumerate(nums):
          if val1 not in dups:
              dups.add(val1)
              for j, val2 in enumerate(nums[i + 1 :]):
                  complement = -val1 - val2
                  if complement in seen and seen[complement] == i:
                      res.add(tuple(sorted((val1, val2, complement))))
                  seen[val2] = i
      return res
  
label_desc: Use image node_id 1 for calling the Solution obj's underlying member method code with example usage: obj.threeSum(nums) and returns: res