def _shrink_dict(self, shrink):
res = {}<EOL>if len(shrink.keys()) == <NUM_LIT:1> and "<STR_LIT:value>" in shrink:<EOL><INDENT>return self.shrink(shrink['<STR_LIT:value>'])<EOL><DEDENT>else:<EOL><INDENT>for a in shrink:<EOL><INDENT>res[a] = self.shrink(shrink[a])<EOL>if not res[a]:<EOL><INDENT>del res[a]<EOL><DEDENT><DEDENT><DEDENT>return res<EOL>
Shrink dict down to essentials

:param shrink: Dict to shrink
:type shrink: dict
:return: Shrunk dict
:rtype: dict