code: def account_representative_set(self, wallet, account, representative, work=None):
          
  
          wallet = self._process_value(wallet, 'wallet')
          account = self._process_value(account, 'account')
          representative = self._process_value(representative, 'account')
  
          payload = {
              "wallet": wallet,
              "account": account,
              "representative": representative,
          }
  
          if work is not None:
              payload['work'] = self._process_value(work, 'work')
  
          resp = self.call('account_representative_set', payload)
  
          return resp['block']
docs: Sets the representative for **account** in **wallet**
  
          .. enable_control required
  
          :param wallet: Wallet to use for account
          :type wallet: str
  
          :param account: Account to set representative for
          :type account: str
  
          :param representative: Representative to set to
          :type representative: str
  
          :param work: If set, is used as the work for the block
          :type work: str
  
          :raises: :py:exc:`nano.rpc.RPCException`
  
          >>> rpc.account_representative_set(
          ...     wallet="000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F",
          ...     account="xrb_39a73oy5ungrhxy5z5oao1xso4zo7dmgpjd4u74xcrx3r1w6rtazuouw6qfi",
          ...     representative="xrb_16u1uufyoig8777y6r8iqjtrw8sg8maqrm36zzcm95jmbd9i9aj5i8abr8u5"
          ... )
          "000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F"