code: def test_namespace_warning_on_override() -> None:
      @pl.api.register_dataframe_namespace("math")
      class CustomMath:
          def __init__(self, df: pl.DataFrame):
              self._df = df
  
      with pytest.raises(UserWarning):
  
          @pl.api.register_dataframe_namespace("math")
          class CustomMath2:
              def __init__(self, df: pl.DataFrame):
                  self._df = df
  
file_path: polars/py-polars/tests/unit/test_api.py
imports: from __future__ import annotations
  import pytest
  import polars
  from polars.testing import assert_frame_equal
label_desc: Use image node_id 7 for calling a global function with example usage: test_namespace_warning_on_override() without return types