code: def to_dicts(data):
      data = [
          {
              "date": datetime.datetime.strptime(
                  x[0].split(" ")[0], "%Y-%m-%d"
              ).date(),
              "group": x[1],
              "value": x[2],
          }
          for x in data
      ]
      data.sort(key=lambda x: x["date"])
      return data
  
file_path: mindsdb/tests/integration_tests/flows/test_ts_predictions.py
imports: import datetime
  import random
  import pytest
  from mindsdb.api.executor.data_types.response_type import RESPONSE_TYPE
  from .http_test_helpers import HTTPHelperMixin
label_desc: Use image node_id 1 for calling a global function with example usage: to_dicts(data) and returns: data