def METHOD_NAME(response, dimensions):
    columns = []
    for item in dimensions:
        if item == "date":
            data_type = "date"
        else:
            data_type = "string"
        columns.append(
            {
                "name": item,
                "friendly_name": item,
                "type": data_type,
            }
        )
    default_items = ["clicks", "impressions", "ctr", "position"]
    for item in default_items:
        columns.append({"name": item, "friendly_name": item, "type": "number"})
    rows = []
    for r in response.get("rows", []):
        d = {}
        for k, value in r.items():
            if k == "keys":
                for index, val in enumerate(value):
                    column_name = columns[index]["name"]
                    column_type = columns[index]["type"]
                    val = get_formatted_value(column_type, val)
                    d[column_name] = val
            else:
                column_name = k
                column_type = [col for col in columns if col["name"] == column_name][0]["type"]
                value = get_formatted_value(column_type, value)
                d[column_name] = value
        rows.append(d)
    return {"columns": columns, "rows": rows}