code: def update_preferences(self, data: Dict[str, Any]) -> None:
      if "series_preferences" in data:
          self.update_series_preferences(data["series_preferences"])
  
      if "sub_series_preferences" in data:
          self.update_sub_series_preferences(
              data["sub_series_preferences"]
          )
  
      if "chart_type" in data:
          self.chart_type = data["chart_type"]
  
      self.save()
  
imports: from fastapi import Request
  from fastapi.responses import JSONResponse
  from labml_db import Model, Index
  from labml_db.serializer.pickle import PickleSerializer
  from typing import Dict, Any, List
  from labml_app.enums import COMPUTEREnums
  from labml_app.logger import logger
  from ..analysis import Analysis
  from ..preferences import Preferences
  from ..series import SeriesModel, Series
  from ..series_collection import SeriesCollection
label_desc: Use image node_id 2 for calling the GPUPreferencesModel obj's underlying member method code with example usage: obj.update_preferences(data) without return types