code: def test_registering_plotly_express_and_kwargs(registering_cleanup):
      # Is unregistered now
      fig = px.scatter(y=np.arange(500))
      assert not isinstance(fig, AbstractFigureAggregator)
      assert len(fig.data) == 1
      assert len(fig.data[0].y) == 500
  
      register_plotly_resampler(
          default_n_shown_samples=50,
          show_dash_kwargs=dict(mode="inline", port=8051),
      )
      fig = px.scatter(y=np.arange(500))
      assert isinstance(fig, FigureResampler)
      assert fig._show_dash_kwargs == dict(mode="inline", port=8051)
      assert len(fig.data) == 1
      assert len(fig.data[0].y) == 50
      assert len(fig.hf_data) == 1
      assert len(fig.hf_data[0]["y"]) == 500
  
      register_plotly_resampler()
      fig = px.scatter(y=np.arange(5000))
      assert isinstance(fig, FigureResampler)
      assert fig._show_dash_kwargs == dict()
      assert len(fig.data) == 1
      assert len(fig.data[0].y) == 1000
      assert len(fig.hf_data) == 1
      assert len(fig.hf_data[0]["y"]) == 5000
  
      unregister_plotly_resampler()
      fig = px.scatter(y=np.arange(500))
      assert not isinstance(fig, AbstractFigureAggregator)
      assert len(fig.data) == 1
      assert len(fig.data[0].y) == 500
  
file_path: plotly-resampler/tests/test_registering.py
imports: from inspect import isfunction
  import numpy
  import plotly.express
  import plotly.graph_objects
  from plotly_resampler import FigureResampler, FigureWidgetResampler
  from plotly_resampler.figure_resampler.figure_resampler_interface import AbstractFigureAggregator
  from plotly_resampler.registering import _get_plotly_constr, register_plotly_resampler, unregister_plotly_resampler
  from .conftest import registering_cleanup
label_desc: Use image node_id 5 for calling a global function with example usage: test_registering_plotly_express_and_kwargs(registering_cleanup) without return types