code: def update_preferences(
      self, data: preferences.PreferencesData
  ) -> None:
      if "base_series_preferences" in data:
          self.update_base_series_preferences(
              data["base_series_preferences"]
          )
  
      if "base_experiment" in data:
          self.base_experiment = data["base_experiment"]
  
      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"]
  
      r = run.get(self.base_experiment)
      if r is not None and r.world_size > 0:  # distributed run
          self.is_base_distributed = True
      else:
          self.is_base_distributed = False
  
      self.save()
  
imports: from typing import Any, Dict, List
  from fastapi import Request
  from labml_db import Model, Index
  from labml_db.serializer.pickle import PickleSerializer
  from labml_db.serializer.yaml import YamlSerializer
  from starlette.responses import JSONResponse
  from labml_app import utils
  from labml_app.logger import logger
  from .distributed_metrics import get_merged_dist_metrics_tracking, get_merged_metric_tracking_util
  from .metrics import MetricsAnalysis, get_metrics_tracking_util, mget
  from ..analysis import Analysis
  from ..None import preferences
  from ...db import run
label_desc: Use image node_id 2 for calling the ComparisonPreferences obj's underlying member method code with example usage: obj.update_preferences(data) without return types