code: def print_coercion_table(
      ntypes,
      inputfirstvalue,
      inputsecondvalue,
      firstarray,
      use_promote_types=False,
  ):
      print("+", end=" ")
      for char in ntypes:
          print(char, end=" ")
      print()
      for row in ntypes:
          if row == "O":
              rowtype = GenericObject
          else:
              rowtype = np.obj2sctype(row)
  
          print(row, end=" ")
          for col in ntypes:
              if col == "O":
                  coltype = GenericObject
              else:
                  coltype = np.obj2sctype(col)
              try:
                  if firstarray:
                      rowvalue = np.array(
                          [rowtype(inputfirstvalue)], dtype=rowtype
                      )
                  else:
                      rowvalue = rowtype(inputfirstvalue)
                  colvalue = coltype(inputsecondvalue)
                  if use_promote_types:
                      char = np.promote_types(
                          rowvalue.dtype, colvalue.dtype
                      ).char
                  else:
                      value = np.add(rowvalue, colvalue)
                      if isinstance(value, np.ndarray):
                          char = value.dtype.char
                      else:
                          char = np.dtype(type(value)).char
              except ValueError:
                  char = "!"
              except OverflowError:
                  char = "@"
              except TypeError:
                  char = "#"
              print(char, end=" ")
          print()
  
file_path: catboost/contrib/python/numpy/py2/numpy/testing/print_coercion_tables.py
imports: from __future__ import division, absolute_import, print_function
  import numpy
label_desc: Use image node_id 2 for calling a global function with example usage: print_coercion_table(ntypes, inputfirstvalue, inputsecondvalue, firstarray, use_promote_types) without return types