code: def update_position_json(dashboard, session, uuid_map):
      try:
          layout = json.loads(dashboard.position_json or "{}")
      except JSONDecodeError:
          layout = {}
  
      for object_ in layout.values():
          if (
              isinstance(object_, dict)
              and object_["type"] == "CHART"
              and object_["meta"]["chartId"]
          ):
              chart_id = object_["meta"]["chartId"]
              if chart_id in uuid_map:
                  object_["meta"]["uuid"] = str(uuid_map[chart_id])
              elif object_["meta"].get("uuid"):
                  del object_["meta"]["uuid"]
  
      dashboard.position_json = json.dumps(layout, indent=4)
  
file_path: superset/superset/migrations/versions/2020-09-28_17-57_b56500de1855_add_uuid_column_to_import_mixin.py
imports: import json
  import os
  from json.decoder import JSONDecodeError
  from uuid import uuid4
  import sqlalchemy
  from alembic import op
  from sqlalchemy.ext.declarative import declarative_base
  from sqlalchemy.orm import load_only
  from sqlalchemy_utils import UUIDType
  from superset import db
  from superset.migrations.shared.utils import assign_uuids
  from superset.utils import core
label_desc: Use image node_id 1 for calling a global function with example usage: update_position_json(dashboard, session, uuid_map) without return types