code: def test_trendline_nan_values(mode, options):
      df = px.data.gapminder().query("continent == 'Oceania'")
      start_date = 1970
      df["pop"][df["year"] < start_date] = np.nan
      fig = px.scatter(
          df,
          x="year",
          y="pop",
          color="country",
          trendline=mode,
          trendline_options=options,
      )
      for trendline in fig["data"][1::2]:
          assert trendline.x[0] >= start_date
          assert len(trendline.x) == len(trendline.y)
  
file_path: plotly.py/packages/python/plotly/plotly/tests/test_optional/test_px/test_trendline.py
imports: import plotly.express
  import numpy
  import pandas
  import pytest
  from datetime import datetime
label_desc: Use image node_id 3 for calling a global function with example usage: test_trendline_nan_values(mode, options) without return types