<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def shrink(self, shrink):
 """ Remove unnecessary parts :param shrink: Object to shringk :type shrink: dict | list :return: Shrunk object :rtype: dict | list """

        if isinstance(shrink, list):
            return self._shrink_list(shrink)
        if isinstance(shrink, dict):
            return self._shrink_dict(shrink)
        return shrink