# 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:


import doctest
import random
import unittest
import gc
import pympler.muppy
from sys import getsizeof
from pympler import muppy
        self.assertFalse(muppy._is_containerobject(''))

    def test_remove_duplicates(self):
        """Test that this operations returns a duplicate-free lists.

        That, is no objects are listed twice. This does not apply to objects
        with same values."""
        (o1, o2, o3, o4, o5) = (1, 'a', 'b', 'c', 5)
        objects = [o1, o2, o3, o4, o5, o5, o4, o3, o2, o1]
        expected = set(objects)
        res = muppy._remove_duplicates(objects)
        self.assertEqual(len(expected), len(res))
        for o in res:
            self.assertTrue(o in expected)

    def test_sort(self):
        """Test that objects are sorted by size."""
        objects = ['', 'a', 'ab', 'ab', 'abc', '0']
        objects = muppy.sort(objects)
        while len(objects) > 1:
            prev_o = objects.pop(0)
            self.assertTrue(getsizeof(objects[0]) >= getsizeof(prev_o),\
                 "The previous element appears to be larger than the " +\
                 "current: %s<%s" % (prev_o, objects[0]))

    def test_ignore_frame(self):
        """Test whether reference cycles are created
        """
        gc.collect()
        gc.disable()

# 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: test/muppy/test_muppy.py
import doctest
import random
import unittest
import gc
import pympler.muppy
from sys import getsizeof
from pympler import muppy

        self.assertFalse(muppy._is_containerobject(''))

    def test_remove_duplicates(self):
        """Test that this operations returns a duplicate-free lists.

        That, is no objects are listed twice. This does not apply to objects
        with same values."""
        (o1, o2, o3, o4, o5) = (1, 'a', 'b', 'c', 5)
        objects = [o1, o2, o3, o4, o5, o5, o4, o3, o2, o1]
        expected = set(objects)
        res = muppy._remove_duplicates(objects)
        self.assertEqual(len(expected), len(res))
        for o in res:
            self.assertTrue(o in expected)

    def test_sort(self):
        """Test that objects are sorted by size."""
        objects = ['', 'a', 'ab', 'ab', 'abc', '0']
        objects = muppy.sort(objects)
        while len(objects) > 1:
            prev_o = objects.pop(0)
            self.assertTrue(getsizeof(objects[0]) >= getsizeof(prev_o),\
                 "The previous element appears to be larger than the " +\
                 "current: %s<%s" % (prev_o, objects[0]))

    def test_ignore_frame(self):
        """Test whether reference cycles are created
        """
        gc.collect()
        gc.disable()

        objs = muppy.get_objects()