code: def _shrink_dict(self, shrink):
          
          res = {}
  
          if len(shrink.keys()) == 1 and "value" in shrink:
              return self.shrink(shrink['value'])
          else:
              for a in shrink:
                  res[a] = self.shrink(shrink[a])
  
                  if not res[a]:
                      del res[a]
          return res
docs: Shrink dict down to essentials
  
          :param shrink: Dict to shrink
          :type shrink: dict
          :return: Shrunk dict
          :rtype: dict