code: def save_dict(self, key: str, my_dict: dict, hierarchical: bool = False):
          
          for _key, _value in my_dict.items():
              if isinstance(_value, dict):
                  if not hierarchical:
                      self._db.hmset(key, {_key: json.dumps(_value)})
                  else:
                      self.save_dict(key + ':' + _key, _value, hierarchical)
              elif isinstance(_value, list):
                  if not hierarchical:
                      self._db.hmset(key, {_key: str(_value)})
                  else:
                      print('saving list at ', key + ':' + _key)
                      self._db.lpush(key + ':' + _key, *_value[::-1])
              elif isinstance(_value, bool):
                  self._db.hmset(key, {_key: str(_value)})
              else:
                  self._db.hmset(key, {_key: _value})
docs: Store the specified dictionary at the specified key.