'Generates a text report on the differences (if any) between two
objects, and either returns it as a string or writes it to a file-like
object.
Parameters
fileobj : file-like object, string, or None (optional)
If `None`, this method returns the report as a string. Otherwise it
returns `None` and writes the report to the given file-like object
(which must have a ``.write()`` method at a minimum), or to a new
file at the path specified.
indent : int
The number of 4 space tabs to indent the report.
overwrite : bool, optional
If ``True``, overwrite the output file if it exists. Raises an
``OSError`` (``IOError`` for Python 2) if ``False`` and the
output file exists. Default is ``False``.
.. versionchanged:: 1.3
``overwrite`` replaces the deprecated ``clobber`` argument.
Returns
report : str or None'

@deprecated_renamed_argument('clobber', 'overwrite', '2.0')
def report(self, fileobj=None, indent=0, overwrite=False):

    return_string = False
    filepath = None
    if isinstance(fileobj, string_types):
        if (os.path.exists(fileobj) and (not overwrite)):
            raise IOError('File    {0}    exists,    aborting    (pass    in    overwrite=True    to    overwrite)'.format(fileobj))
        else:
            filepath = fileobj
            fileobj = open(filepath, 'w')
    elif (fileobj is None):
        fileobj = io.StringIO()
        return_string = True
    self._fileobj = fileobj
    self._indent = indent
    try:
        self._report()
    finally:
        if filepath:
            fileobj.close()
    if return_string:
        return fileobj.getvalue()
