code: def to_dict(self):
          
          list_data = []
          for key, value in list(self.data.items()):
              row = list(key)
              row.append(value)
              list_data.append(row)
          return {
              'groups': self.groups,
              'data': list_data
          }
docs: Return common list python object.
          :returns: Dictionary of groups and data
          :rtype: dict