# Path: pympler/muppy.py
# def ignore_object(obj: Any) -> bool:
# def get_objects(remove_dups: bool = True, include_frames: bool = False
#                 ) -> List[Any]:
# def get_size(objects: List[Any]) -> int:
# def get_diff(left: List[Any], right: List[Any]) -> Dict[str, List[Any]]:
#     def partition(objects: List[Any]) -> Dict[type, List[Any]]:
#     def get_not_included(foo: List[Any], bar: Dict[type, List[Any]]
#                          ) -> List[Any]:
# def sort(objects: List[Any]) -> List[Any]:
# def filter(objects: List[Any], Type: Optional[type] = None, min: int = -1,
#            max: int = -1) -> List[Any]:
# def get_referents(object: Any, level: int = 1) -> List[Any]:
# def _get_usage(function: Callable, *args: Any) -> Optional[List]:
#     def _get_summaries(function: Callable, *args: Any) -> Tuple:
#     def _get_usage(function: Callable, *args: Any) -> List:
#     def noop() -> None:
# def _is_containerobject(o: Any) -> bool:
# def _remove_duplicates(objects: List[Any]) -> List[Any]:
# def print_summary() -> None:
# 
# Path: pympler/summary.py
# def _init_representations():
# def summarize(objects):
# def get_diff(left, right):
# def format_(rows, limit=15, sort='size', order='descending'):
# def _format_table(rows, header=True):
# def print_(rows, limit=15, sort='size', order='descending'):
# def _repr(o, verbosity=1):
# def _traverse(summary, function, *args):
# def _subtract(summary, o):
# def _sweep(summary):
# 
# Path: pympler/util/compat.py
# def object_in_list(obj: Any, l: Iterable) -> bool:


import gc
import inspect
from pympler import muppy, summary
from pympler.util import compat
        # ignore this and the caller frame
        self.o1 = self._get_objects(ignore+(inspect.currentframe(),))
        diff = muppy.get_diff(self.o0, self.o1)
        self.o0 = self.o1
        # manual cleanup, see comment above
        return diff

    def print_diff(self, ignore=()):
        """Print the diff to the last time the state of objects was measured.

        keyword arguments
        ignore -- list of objects to ignore
        """
        # ignore this and the caller frame
        for line in self.format_diff(ignore+(inspect.currentframe(),)):
            print(line)

    def format_diff(self, ignore=()):
        """Format the diff to the last time the state of objects was measured.

        keyword arguments
        ignore -- list of objects to ignore
        """
        # ignore this and the caller frame
        lines = []
        diff = self.get_diff(ignore+(inspect.currentframe(),))
        lines.append("Added objects:")
        for line in summary.format_(summary.summarize(diff['+'])):
            lines.append(line)
        lines.append("Removed objects:")

# Path: pympler/muppy.py
# def ignore_object(obj: Any) -> bool:
# def get_objects(remove_dups: bool = True, include_frames: bool = False
#                 ) -> List[Any]:
# def get_size(objects: List[Any]) -> int:
# def get_diff(left: List[Any], right: List[Any]) -> Dict[str, List[Any]]:
#     def partition(objects: List[Any]) -> Dict[type, List[Any]]:
#     def get_not_included(foo: List[Any], bar: Dict[type, List[Any]]
#                          ) -> List[Any]:
# def sort(objects: List[Any]) -> List[Any]:
# def filter(objects: List[Any], Type: Optional[type] = None, min: int = -1,
#            max: int = -1) -> List[Any]:
# def get_referents(object: Any, level: int = 1) -> List[Any]:
# def _get_usage(function: Callable, *args: Any) -> Optional[List]:
#     def _get_summaries(function: Callable, *args: Any) -> Tuple:
#     def _get_usage(function: Callable, *args: Any) -> List:
#     def noop() -> None:
# def _is_containerobject(o: Any) -> bool:
# def _remove_duplicates(objects: List[Any]) -> List[Any]:
# def print_summary() -> None:
# 
# Path: pympler/summary.py
# def _init_representations():
# def summarize(objects):
# def get_diff(left, right):
# def format_(rows, limit=15, sort='size', order='descending'):
# def _format_table(rows, header=True):
# def print_(rows, limit=15, sort='size', order='descending'):
# def _repr(o, verbosity=1):
# def _traverse(summary, function, *args):
# def _subtract(summary, o):
# def _sweep(summary):
# 
# Path: pympler/util/compat.py
# def object_in_list(obj: Any, l: Iterable) -> bool:


# Path: pympler/tracker.py
import gc
import inspect
from pympler import muppy, summary
from pympler.util import compat

        # ignore this and the caller frame
        self.o1 = self._get_objects(ignore+(inspect.currentframe(),))
        diff = muppy.get_diff(self.o0, self.o1)
        self.o0 = self.o1
        # manual cleanup, see comment above
        return diff

    def print_diff(self, ignore=()):
        """Print the diff to the last time the state of objects was measured.

        keyword arguments
        ignore -- list of objects to ignore
        """
        # ignore this and the caller frame
        for line in self.format_diff(ignore+(inspect.currentframe(),)):
            print(line)

    def format_diff(self, ignore=()):
        """Format the diff to the last time the state of objects was measured.

        keyword arguments
        ignore -- list of objects to ignore
        """
        # ignore this and the caller frame
        lines = []
        diff = self.get_diff(ignore+(inspect.currentframe(),))
        lines.append("Added objects:")
        for line in summary.format_(summary.summarize(diff['+'])):
            lines.append(line)
        lines.append("Removed objects:")

        for line in summary.format_(summary.summarize(diff['-'])):