Derived from IPython's dict and sequence pretty printer functions,
        https://github.com/ipython/ipython/blob/master/IPython/lib/pretty.py

def _repr_pretty_(self, p, cycle):
        """Derived from IPython's dict and sequence pretty printer functions,
        https://github.com/ipython/ipython/blob/master/IPython/lib/pretty.py
        """
        if cycle:
            p.text('{...}')
        else:
            keys = self.keys()

            if keys:
                delim_start = '[{'
                delim_end = '}]'

                wid_max_max = self._repr_max_width
                wid_max = max([len(k) for k in keys])
                wid_max = min([wid_max, wid_max_max])
                key_template = '{{:{:d}s}}: '.format(wid_max)

                with p.group(len(delim_start), delim_start, delim_end):
                    # Loop over item keys
                    for idx, key in p._enumerate(keys):
                        if idx:
                            p.text(',')
                            p.breakable()

                        p.text(key_template.format(key))
                        p.pretty(self[key])
            else:
                p.text('{}')