class BybitAccountService extends BybitAccountServiceRaw implements AccountService {

  private final BybitAccountType accountType;

  public BybitAccountService(Exchange exchange, BybitAccountType accountType) {
    super(exchange);
    this.accountType = accountType;
  }

  @Override
  public AccountInfo getAccountInfo() throws IOException {
    List<Wallet> adaptedWallets = getAdaptedWallets();
    return new AccountInfo(adaptedWallets);
  }

  private List<Wallet> getAdaptedWallets() throws IOException {<FILL_FUNCTION_BODY>}

  private List<Wallet> getAdaptedAllCoinsWallets() throws IOException {
    BybitResult<BybitAllCoinsBalance> allCoinsBalanceResult = getAllCoinsBalance(accountType);
    BybitAllCoinsBalance allCoinsBalance = allCoinsBalanceResult.getResult();
    List<Wallet> wallets = new ArrayList<>();
    wallets.add(adaptBybitBalances(allCoinsBalance));
    return wallets;
  }

  private List<Wallet> getAdaptedBalanceWallets() throws IOException {
    BybitResult<BybitWalletBalance> walletBalances = getWalletBalances(accountType);
    BybitWalletBalance walletBalancesResult = walletBalances.getResult();
    List<BybitAccountBalance> accounts = walletBalancesResult.getList();
    return accounts.stream()
        .map(bybitAccountBalance -> adaptBybitBalances(bybitAccountBalance.getCoin()))
        .collect(Collectors.toList());
  }
}

    switch (accountType) {
      case CONTRACT:
      case UNIFIED:
      case SPOT:
        return getAdaptedBalanceWallets();
      case INVESTMENT:
      case OPTION:
      case FUND:
        return getAdaptedAllCoinsWallets();
      default:
        throw new IllegalStateException("Unexpected value: " + accountType);
    }
  
<methods>public void <init>(org.knowm.xchange.Exchange) ,public BybitResult<org.knowm.xchange.bybit.dto.account.allcoins.BybitAllCoinsBalance> getAllCoinsBalance(org.knowm.xchange.bybit.dto.account.walletbalance.BybitAccountType) throws java.io.IOException,public BybitResult<org.knowm.xchange.bybit.dto.account.feerates.BybitFeeRates> getFeeRates(org.knowm.xchange.bybit.dto.BybitCategory, java.lang.String) throws java.io.IOException,public BybitResult<org.knowm.xchange.bybit.dto.account.walletbalance.BybitWalletBalance> getWalletBalances(org.knowm.xchange.bybit.dto.account.walletbalance.BybitAccountType) throws java.io.IOException<variables>