nodes: 0, module; 1, function_definition; 2, function_name:_get_handler_set; 3, parameters; 4, block; 5, identifier:cls; 6, identifier:request; 7, identifier:fail_enum; 8, default_parameter; 9, expression_statement; 10, expression_statement; 11, expression_statement; 12, for_statement; 13, return_statement; 14, identifier:header_proto; 15, None; 16, comment:"""Goes through the list of ClientSortControls and returns a list of
          unique _ValueHandlers. Maintains order, but drops ClientSortControls
          that have already appeared to help prevent spamming.
          """; 17, assignment; 18, assignment; 19, identifier:controls; 20, attribute; 21, block; 22, identifier:handlers; 23, identifier:added; 24, call; 25, identifier:handlers; 26, list; 27, identifier:request; 28, identifier:sorting; 29, expression_statement; 30, if_statement; 31, identifier:set; 32, argument_list; 33, assignment; 34, comparison_operator:control_bytes not in added; 35, block; 36, identifier:control_bytes; 37, call; 38, identifier:control_bytes; 39, identifier:added; 40, expression_statement; 41, expression_statement; 42, attribute; 43, argument_list; 44, call; 45, call; 46, identifier:controls; 47, identifier:SerializeToString; 48, attribute; 49, argument_list; 50, attribute; 51, argument_list; 52, identifier:added; 53, identifier:add; 54, identifier:control_bytes; 55, identifier:handlers; 56, identifier:append; 57, call; 58, attribute; 59, argument_list; 60, identifier:cls; 61, identifier:_ValueHandler; 62, identifier:controls; 63, identifier:fail_enum; 64, identifier:header_proto
code: def _get_handler_set(cls, request, fail_enum, header_proto=None):
          """Goes through the list of ClientSortControls and returns a list of
          unique _ValueHandlers. Maintains order, but drops ClientSortControls
          that have already appeared to help prevent spamming.
          """
          added = set()
          handlers = []
  
          for controls in request.sorting:
              control_bytes = controls.SerializeToString()
              if control_bytes not in added:
                  added.add(control_bytes)
                  handlers.append(
                      cls._ValueHandler(controls, fail_enum, header_proto))
  
          return handlers