code: def add_newdoc_for_scalar_type(obj, fixed_aliases, doc):
      o = getattr(_numerictypes, obj)
  
      character_code = dtype(o).char
      canonical_name_doc = (
          ""
          if obj == o.__name__
          else "Canonical name: ``np.{}``.\n    ".format(obj)
      )
      alias_doc = "".join(
          "Alias: ``np.{}``.\n    ".format(alias)
          for alias in fixed_aliases
      )
      alias_doc += "".join(
          "Alias *on this platform*: ``np.{}``: {}.\n    ".format(
              alias, doc
          )
          for (alias_type, alias, doc) in possible_aliases
          if alias_type is o
      )
  
      docstring = """
      {doc}
      Character code: ``'{character_code}'``.
      {canonical_name_doc}{alias_doc}
      """.format(
          doc=doc.strip(),
          character_code=character_code,
          canonical_name_doc=canonical_name_doc,
          alias_doc=alias_doc,
      )
  
      add_newdoc("numpy.core.numerictypes", obj, docstring)
  
imports: from __future__ import division, absolute_import, print_function
  import sys
  from numpy.core import numerictypes
  from numpy.core import dtype
  from numpy.core.function_base import add_newdoc
label_desc: Use image node_id 2 for calling a global function with example usage: add_newdoc_for_scalar_type(obj, fixed_aliases, doc) without return types