code: def test_plot_lines_markers():
      """Tests ``plot_lines_markers``."""
      df = pd.DataFrame(
          {
              "ts": [1, 2, 3, 4, 5, 6],
              "line1": [3, 4, 5, 6, 7, 7],
              "line2": [4, 5, 6, 7, 8, 8],
              "marker1": [np.nan, np.nan, 5, 6, np.nan, np.nan],
              "marker2": [np.nan, 5, 6, np.nan, np.nan, 8],
          }
      )
  
      fig = plot_lines_markers(
          df=df,
          x_col="ts",
          line_cols=["line1", "line2"],
          marker_cols=["marker1", "marker2"],
          line_colors=None,
          marker_colors=None,
      )
  
      assert len(fig.data) == 4
      assert fig.data[0].line.color is None
      assert fig.data[1].line.color is None
      assert fig.data[2].marker.color is None
      assert fig.data[3].marker.color is None
  
      # Next we make the marker and line colors consistent
      marker_colors = get_distinct_colors(num_colors=2, opacity=1.0)
  
      line_colors = get_distinct_colors(num_colors=2, opacity=0.5)
  
      fig = plot_lines_markers(
          df=df,
          x_col="ts",
          line_cols=["line1", "line2"],
          marker_cols=["marker1", "marker2"],
          line_colors=line_colors,
          marker_colors=marker_colors,
      )
  
      assert len(fig.data) == 4
      assert fig.data[0].line.color == "rgba(31, 119, 180, 0.5)"
      assert fig.data[1].line.color == "rgba(255, 127, 14, 0.5)"
      assert fig.data[2].marker.color == "rgba(31, 119, 180, 1.0)"
      assert fig.data[3].marker.color == "rgba(255, 127, 14, 1.0)"
  
      # Length of `line_colors` must be larger than or equal to length of `line_cols` if passed.
      with pytest.raises(
          ValueError, match="If `line_colors` is passed"
      ):
          plot_lines_markers(
              df=df,
              x_col="ts",
              line_cols=["line1", "line2"],
              marker_cols=["marker1", "marker2"],
              line_colors=line_colors[:1],
              marker_colors=marker_colors,
          )
  
      # At least one of `line_cols` or `marker_cols` or `band_cols`
      # must be provided (not None).
      with pytest.raises(ValueError, match="At least one of"):
          plot_lines_markers(
              df=df,
              x_col="ts",
              line_cols=None,
              marker_cols=None,
              band_cols=None,
              line_colors=None,
              marker_colors=None,
          )
  
imports: import numpy
  import pandas
  import pytest
  from greykite.common.constants import END_TIME_COL
  from greykite.common.constants import START_TIME_COL
  from greykite.common.python_utils import assert_equal
  from greykite.common.viz.colors_utils import get_distinct_colors
  from greykite.common.viz.timeseries_annotate import add_multi_vrects
  from greykite.common.viz.timeseries_annotate import plot_anomalies_over_forecast_vs_actual
  from greykite.common.viz.timeseries_annotate import plot_event_periods_multi
  from greykite.common.viz.timeseries_annotate import plot_lines_markers
  from greykite.common.viz.timeseries_annotate import plot_overlay_anomalies_multi_metric
  from greykite.common.viz.timeseries_annotate import plot_precision_recall_curve
  from greykite.common.viz.timeseries_annotate import plt_annotate_series
  from greykite.common.viz.timeseries_annotate import plt_compare_series_annotations
label_desc: Use image node_id 4 for calling a global function with example usage: test_plot_lines_markers() without return types