docstr: Calculate the real adjust deal amount when considering the trading unit
  :param current_amount:
  :param target_amount:
  :param factor:
  :return  real_deal_amount;  Positive deal_amount indicates buying more stock.
docstr_tok: ["Calculate","the","real","adjust","deal","amount","when","considering","the","trading","unit",":","param","current_amount",":",":","param","target_amount",":",":","param","factor",":",":","return","real_deal_amount",";","Positive","deal_amount","indicates","buying","more","stock","."]
code: def get_real_deal_amount(
      self,
      current_amount: float,
      target_amount: float,
      factor: float | None = None,
  ) -> float:
      """
      Calculate the real adjust deal amount when considering the trading unit
      :param current_amount:
      :param target_amount:
      :param factor:
      :return  real_deal_amount;  Positive deal_amount indicates buying more stock.
      """
      if current_amount == target_amount:
          return 0
      elif current_amount < target_amount:
          deal_amount = target_amount - current_amount
          deal_amount = self.round_amount_by_trade_unit(
              deal_amount, factor
          )
          return deal_amount
      else:
          if target_amount == 0:
              return -current_amount
          else:
              deal_amount = current_amount - target_amount
              deal_amount = self.round_amount_by_trade_unit(
                  deal_amount, factor
              )
              return -deal_amount
  
imports: from __future__ import annotations
  from collections import defaultdict
  from typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple, Type, Union, cast
  from ..utils.index_data import IndexData
  import random
  import numpy
  import pandas
  from qlib.backtest.position import BasePosition
  from ..config import C
  from ..constant import REG_CN, REG_TW
  from ..data.data import D
  from ..log import get_module_logger
  from .decision import Order, OrderDir, OrderHelper
  from .high_performance_ds import BaseQuote, NumpyQuote
label_desc: Use image node_id 17 for calling the Exchange obj's underlying member method code with example usage: obj.get_real_deal_amount(current_amount, target_amount, factor) and returns: int, deal_amount, unknown, unknown