code: def update_preferences(self, data: PreferencesData) -> None:
      if "series_preferences" in data:
          self.update_series_preferences(data["series_preferences"])
  
      if "chart_type" in data:
          self.chart_type = data["chart_type"]
  
      if "step_range" in data:
          self.step_range = data["step_range"]
  
      if "focus_smoothed" in data:
          self.focus_smoothed = data["focus_smoothed"]
  
      self.save()
  
imports: from typing import Dict, List, Any, Union
label_desc: Use image node_id 2 for calling the Preferences obj's underlying member method code with example usage: obj.update_preferences(data) without return types