class_docstr: Overrides the built in dictionary pretty representation to look more similar to the external
  prettyprinter libary.
class_docstr_tok: ["Overrides","the","built","in","dictionary","pretty","representation","to","look","more","similar","to","the","external","prettyprinter","libary","."]
code: def _pprint_dict(
      self, object, stream, indent, allowance, context, level
  ):
      # Add a few newlines and the appropriate indentation to dictionary printing
      # compare with https://github.com/python/cpython/blob/3.9/Lib/pprint.py
      write = stream.write
      indent += self._indent_per_level
      write("{\n" + " " * (indent + 1))
      if self._indent_per_level > 1:
          write((self._indent_per_level - 1) * " ")
      length = len(object)
      if length:
          if self._sort_dicts:
              items = sorted(object.items(), key=pprint._safe_tuple)
          else:
              items = object.items()
          self._format_dict_items(
              items, stream, indent, allowance + 1, context, level
          )
      write("}\n" + " " * (indent - 1))
  
imports: import abc
  import json
  import os
  from collections import ChainMap
  from typing import Any, Union
  import logging
  from functools import partial
  import pprint
  import attr
  from alibi.saving import load_explainer, save_explainer, NumpyEncoder
  from alibi.version import __version__
label_desc: Use image node_id 2 for calling the AlibiPrettyPrinter obj's underlying member method code with example usage: obj._pprint_dict(object, stream, indent, allowance, context, level) without return types