def alter_positions(dashboard: Dashboard, old_to_new_slc_id_dict: Dict[(int, int)]) -> None:
    'Updates slice_ids in the position json.\n\n        Sample position_json data:\n        {\n            "DASHBOARD_VERSION_KEY": "v2",\n            "DASHBOARD_ROOT_ID": {\n                "type": "DASHBOARD_ROOT_TYPE",\n                "id": "DASHBOARD_ROOT_ID",\n                "children": ["DASHBOARD_GRID_ID"]\n            },\n            "DASHBOARD_GRID_ID": {\n                "type": "DASHBOARD_GRID_TYPE",\n                "id": "DASHBOARD_GRID_ID",\n                "children": ["DASHBOARD_CHART_TYPE-2"]\n            },\n            "DASHBOARD_CHART_TYPE-2": {\n                "type": "CHART",\n                "id": "DASHBOARD_CHART_TYPE-2",\n                "children": [],\n                "meta": {\n                    "width": 4,\n                    "height": 50,\n                    "chartId": 118\n                }\n            },\n        }\n        '
    position_data = json.loads(dashboard.position_json)
    position_json = position_data.values()
    for value in position_json:
        if (isinstance(value, dict) and value.get('meta') and value.get('meta', {}).get('chartId')):
            old_slice_id = value['meta']['chartId']
            if (old_slice_id in old_to_new_slc_id_dict):
                value['meta']['chartId'] = old_to_new_slc_id_dict[old_slice_id]
    dashboard.position_json = json.dumps(position_data)
Updates slice_ids in the position json.

Sample position_json data:
{
    "DASHBOARD_VERSION_KEY": "v2",
    "DASHBOARD_ROOT_ID": {
        "type": "DASHBOARD_ROOT_TYPE",
        "id": "DASHBOARD_ROOT_ID",
        "children": ["DASHBOARD_GRID_ID"]
    },
    "DASHBOARD_GRID_ID": {
        "type": "DASHBOARD_GRID_TYPE",
        "id": "DASHBOARD_GRID_ID",
        "children": ["DASHBOARD_CHART_TYPE-2"]
    },
    "DASHBOARD_CHART_TYPE-2": {
        "type": "CHART",
        "id": "DASHBOARD_CHART_TYPE-2",
        "children": [],
        "meta": {
            "width": 4,
            "height": 50,
            "chartId": 118
        }
    },
}
def alter_positions(dashboard: Dashboard, old_to_new_slc_id_dict: Dict[(int, int)]) -> None:
    'Updates slice_ids in the position json.\n\n        Sample position_json data:\n        {\n            "DASHBOARD_VERSION_KEY": "v2",\n            "DASHBOARD_ROOT_ID": {\n                "type": "DASHBOARD_ROOT_TYPE",\n                "id": "DASHBOARD_ROOT_ID",\n                "children": ["DASHBOARD_GRID_ID"]\n            },\n            "DASHBOARD_GRID_ID": {\n                "type": "DASHBOARD_GRID_TYPE",\n                "id": "DASHBOARD_GRID_ID",\n                "children": ["DASHBOARD_CHART_TYPE-2"]\n            },\n            "DASHBOARD_CHART_TYPE-2": {\n                "type": "CHART",\n                "id": "DASHBOARD_CHART_TYPE-2",\n                "children": [],\n                "meta": {\n                    "width": 4,\n                    "height": 50,\n                    "chartId": 118\n                }\n            },\n        }\n        '
    position_data = json.loads(dashboard.position_json)
    position_json = position_data.values()
    for value in position_json:
        if (isinstance(value, dict) and value.get('meta') and value.get('meta', {}).get('chartId')):
            old_slice_id = value['meta']['chartId']
            if (old_slice_id in old_to_new_slc_id_dict):
                value['meta']['chartId'] = old_to_new_slc_id_dict[old_slice_id]
    dashboard.position_json = json.dumps(position_data)