code: def chn2num(chinese_string, numbering_type=NUMBERING_TYPES[1]):
      def get_symbol(char, system):
          for u in system.units:
              if char in [
                  u.traditional,
                  u.simplified,
                  u.big_s,
                  u.big_t,
              ]:
                  return u
          for d in system.digits:
              if char in [
                  d.traditional,
                  d.simplified,
                  d.big_s,
                  d.big_t,
                  d.alt_s,
                  d.alt_t,
              ]:
                  return d
          for m in system.math:
              if char in [m.traditional, m.simplified]:
                  return m
  
      def string2symbols(chinese_string, system):
          int_string, dec_string = chinese_string, ""
          for p in [
              system.math.point.simplified,
              system.math.point.traditional,
          ]:
              if p in chinese_string:
                  int_string, dec_string = chinese_string.split(p)
                  break
          return [get_symbol(c, system) for c in int_string], [
              get_symbol(c, system) for c in dec_string
          ]
  
      def correct_symbols(integer_symbols, system):
          """
          一百八 to 一百八十
          一亿一千三百万 to 一亿 一千万 三百万
          """
  
          if integer_symbols and isinstance(integer_symbols[0], CNU):
              if integer_symbols[0].power == 1:
                  integer_symbols = [system.digits[1]] + integer_symbols
  
          if len(integer_symbols) > 1:
              if isinstance(integer_symbols[-1], CND) and isinstance(
                  integer_symbols[-2], CNU
              ):
                  integer_symbols.append(
                      CNU(
                          integer_symbols[-2].power - 1,
                          None,
                          None,
                          None,
                          None,
                      )
                  )
  
          result = []
          unit_count = 0
          for s in integer_symbols:
              if isinstance(s, CND):
                  result.append(s)
                  unit_count = 0
              elif isinstance(s, CNU):
                  current_unit = CNU(s.power, None, None, None, None)
                  unit_count += 1
  
              if unit_count == 1:
                  result.append(current_unit)
              elif unit_count > 1:
                  for i in range(len(result)):
                      if (
                          isinstance(result[-i - 1], CNU)
                          and result[-i - 1].power < current_unit.power
                      ):
                          result[-i - 1] = CNU(
                              result[-i - 1].power + current_unit.power,
                              None,
                              None,
                              None,
                              None,
                          )
          return result
  
      def compute_value(integer_symbols):
          """
          Compute the value.
          When current unit is larger than previous unit, current unit * all previous units will be used as all previous units.
          e.g. '两千万' = 2000 * 10000 not 2000 + 10000
          """
          value = [0]
          last_power = 0
          for s in integer_symbols:
              if isinstance(s, CND):
                  value[-1] = s.value
              elif isinstance(s, CNU):
                  value[-1] *= pow(10, s.power)
                  if s.power > last_power:
                      value[:-1] = list(
                          map(
                              lambda v: v * pow(10, s.power), value[:-1]
                          )
                      )
                      last_power = s.power
                  value.append(0)
          return sum(value)
  
      system = create_system(numbering_type)
      int_part, dec_part = string2symbols(chinese_string, system)
      int_part = correct_symbols(int_part, system)
      int_str = str(compute_value(int_part))
      dec_str = "".join([str(d.value) for d in dec_part])
      if dec_part:
          return "{0}.{1}".format(int_str, dec_str)
      else:
          return int_str
  
imports: import argparse
  import codecs
  import os
  import re
  import string
  import sys
label_desc: Use image node_id 2 for calling a global function with example usage: chn2num(chinese_string, numbering_type) and returns: unknown,  unknown, result, sum, str, int_str, u, d, m