code: def as_dict(self, decode=False):
          
          res = self.database.hgetall(self.key)
          return decode_dict(res) if decode else res
docs: Return a dictionary containing all the key/value pairs in the
          hash.