code: def remove_empty_from_dict(dictionary):
      
      if isinstance(dictionary, dict):
          return dict(
              (k,
               remove_empty_from_dict(v)) for k, v in iteritems(
                   dictionary) if v and remove_empty_from_dict(v))
      elif isinstance(dictionary, list):
          return [remove_empty_from_dict(v) for v in dictionary if v and remove_empty_from_dict(v)]
      return dictionary
docs: Remove empty items from dictionary d
  
      :param dictionary:
      :return: