nodes: 0, module; 1, function_definition; 2, function_name:representatives; 3, parameters; 4, block; 5, identifier:self; 6, default_parameter; 7, default_parameter; 8, expression_statement; 9, expression_statement; 10, if_statement; 11, if_statement; 12, expression_statement; 13, expression_statement; 14, for_statement; 15, return_statement; 16, identifier:count; 17, None; 18, identifier:sorting; 19, False; 20, comment:"""
          Returns a list of pairs of representative and its voting weight
  
          :param count: Max amount of representatives to return
          :type count: int
  
          :param sorting: If true, sorts by weight
          :type sorting: bool
  
          :raises: :py:exc:`nano.rpc.RPCException`
  
          >>> rpc.representatives()
          {
              "xrb_1111111111111111111111111111111111111111111111111117353trpda":
                  3822372327060170000000000000000000000,
              "xrb_1111111111111111111111111111111111111111111111111awsq94gtecn":
                  30999999999999999999999999000000,
              "xrb_114nk4rwjctu6n6tr6g6ps61g1w3hdpjxfas4xj1tq6i8jyomc5d858xr1xi":
                  0
          }
  
  
          """; 21, assignment; 22, comparison_operator:count is not None; 23, block; 24, identifier:sorting; 25, block; 26, assignment; 27, assignment; 28, pattern_list; 29, call; 30, block; 31, identifier:representatives; 32, identifier:payload; 33, dictionary; 34, identifier:count; 35, None; 36, expression_statement; 37, expression_statement; 38, identifier:resp; 39, call; 40, identifier:representatives; 41, boolean_operator; 42, identifier:k; 43, identifier:v; 44, attribute; 45, argument_list; 46, expression_statement; 47, assignment; 48, assignment; 49, attribute; 50, argument_list; 51, call; 52, dictionary; 53, identifier:representatives; 54, identifier:items; 55, assignment; 56, subscript; 57, call; 58, subscript; 59, call; 60, identifier:self; 61, identifier:call; 62, string; 63, identifier:payload; 64, attribute; 65, argument_list; 66, subscript; 67, call; 68, identifier:payload; 69, string; 70, attribute; 71, argument_list; 72, identifier:payload; 73, string; 74, attribute; 75, argument_list; 76, string_content:representatives; 77, identifier:resp; 78, identifier:get; 79, string; 80, identifier:representatives; 81, identifier:k; 82, identifier:int; 83, argument_list; 84, string_content:count; 85, identifier:self; 86, identifier:_process_value; 87, identifier:count; 88, string; 89, string_content:sorting; 90, identifier:self; 91, identifier:_process_value; 92, identifier:sorting; 93, string; 94, string_content:representatives; 95, identifier:v; 96, string_content:int; 97, string_content:strbool
code: def representatives(self, count=None, sorting=False):
          """
          Returns a list of pairs of representative and its voting weight
  
          :param count: Max amount of representatives to return
          :type count: int
  
          :param sorting: If true, sorts by weight
          :type sorting: bool
  
          :raises: :py:exc:`nano.rpc.RPCException`
  
          >>> rpc.representatives()
          {
              "xrb_1111111111111111111111111111111111111111111111111117353trpda":
                  3822372327060170000000000000000000000,
              "xrb_1111111111111111111111111111111111111111111111111awsq94gtecn":
                  30999999999999999999999999000000,
              "xrb_114nk4rwjctu6n6tr6g6ps61g1w3hdpjxfas4xj1tq6i8jyomc5d858xr1xi":
                  0
          }
  
  
          """
          payload = {}
  
          if count is not None:
              payload['count'] = self._process_value(count, 'int')
  
          if sorting:
              payload['sorting'] = self._process_value(sorting, 'strbool')
  
          resp = self.call('representatives', payload)
  
          representatives = resp.get('representatives') or {}
  
          for k, v in representatives.items():
              representatives[k] = int(v)
  
          return representatives