def parse_balance_by_type(self, type, response):
    if ((type == 'account') or (type == 'spot')):
        return self.parse_account_balance(response)
    elif (type == 'margin'):
        return self.parse_margin_balance(response)
    elif (type == 'futures'):
        return self.parse_futures_balance(response)
    elif (type == 'swap'):
        return self.parse_swap_balance(response)
    raise NotSupported((((self.id + " fetchBalance does not support the '") + type) + "' type(the type must be one of 'account', 'spot', 'margin', 'futures', 'swap')"))
def parse_balance_by_type(self, type, response):
    if ((type == 'account') or (type == 'spot')):
        return self.parse_account_balance(response)
    elif (type == 'margin'):
        return self.parse_margin_balance(response)
    elif (type == 'futures'):
        return self.parse_futures_balance(response)
    elif (type == 'swap'):
        return self.parse_swap_balance(response)
    raise NotSupported((((self.id + " fetchBalance does not support the '") + type) + "' type(the type must be one of 'account', 'spot', 'margin', 'futures', 'swap')"))