code: def add_newdoc_for_scalar_type(obj, fixed_aliases, doc):
      # note: `:field: value` is rST syntax which renders as field lists.
      o = getattr(_numerictypes, obj)
  
      character_code = dtype(o).char
      canonical_name_doc = (
          ""
          if obj == o.__name__
          else f":Canonical name: `numpy.{obj}`\n    "
      )
      if fixed_aliases:
          alias_doc = "".join(
              f":Alias: `numpy.{alias}`\n    "
              for alias in fixed_aliases
          )
      else:
          alias_doc = ""
      alias_doc += "".join(
          f"{_doc_alias_string} `numpy.{alias}`: {doc}.\n    "
          for (alias_type, alias, doc) in possible_aliases
          if alias_type is o
      )
  
      docstring = f"""
      {doc.strip()}
  
      :Character code: ``'{character_code}'``
      {canonical_name_doc}{alias_doc}
      """
  
      add_newdoc("numpy._core.numerictypes", obj, docstring)
  
file_path: numpy/numpy/_core/_add_newdocs_scalars.py
imports: import sys
  import os
  from numpy._core import dtype
  from numpy._core import numerictypes
  from numpy._core.function_base import add_newdoc
label_desc: Use image node_id 3 for calling a global function with example usage: add_newdoc_for_scalar_type(obj, fixed_aliases, doc) without return types