code: def test_update_traces_by_type(self):
      self.assert_update_traces(
          [0, 2, 9],
          {"visible": "legendonly"},
          selector={"type": "scatter"},
      )
  
      self.assert_update_traces(
          [0, 2, 9], selector={"type": "scatter"}, visible=False
      )
  
      self.assert_update_traces(
          [1], {"visible": "legendonly"}, selector={"type": "bar"}
      )
  
      self.assert_update_traces(
          [3], {"colorscale": "Viridis"}, selector={"type": "heatmap"}
      )
  
      # Nest dictionaries
      self.assert_update_traces(
          [4, 5],
          {"marker": {"line": {"color": "yellow"}}},
          selector={"type": "scatter3d"},
      )
  
      # dot syntax
      self.assert_update_traces(
          [4, 5],
          {"marker.line.color": "cyan"},
          selector={"type": "scatter3d"},
      )
  
      # underscore syntax
      self.assert_update_traces(
          [4, 5],
          dict(marker_line_color="pink"),
          selector={"type": "scatter3d"},
      )
  
      # underscore syntax with kwarg
      self.assert_update_traces(
          [4, 5],
          selector={"type": "scatter3d"},
          marker_line_color="red",
      )
  
      self.assert_update_traces(
          [6, 7],
          {"line": {"dash": "dot"}},
          selector={"type": "scatterpolar"},
      )
  
      # Nested dictionaries
      self.assert_update_traces(
          [8],
          {"dimensions": {1: {"label": "Dimension 1"}}},
          selector={"type": "parcoords"},
      )
  
      # Dot syntax
      self.assert_update_traces(
          [8],
          {"dimensions[1].label": "Dimension A"},
          selector={"type": "parcoords"},
      )
  
      # underscore syntax
      # Dot syntax
      self.assert_update_traces(
          [8],
          dict(dimensions_1_label="Dimension X"),
          selector={"type": "parcoords"},
      )
  
      self.assert_update_traces(
          [], {"hoverinfo": "label+percent"}, selector={"type": "pie"}
      )
  
imports: from unittest import TestCase
  import inspect
  import copy
  import pytest
  import plotly.graph_objs
  from plotly.subplots import make_subplots
  from functools import reduce
label_desc: Use image node_id 12 for calling the TestSelectForEachUpdateTraces obj's underlying member method code with example usage: obj.test_update_traces_by_type() without return types