code: def test_csr_polynomial_expansion_windows_fail(csr_container):
      # Minimum needed to ensure integer overflow occurs while guaranteeing an
      # int64-indexable output.
      n_features = int(np.iinfo(np.int64).max ** (1 / 3) + 3)
      data = [1.0]
      row = [0]
      col = [n_features - 1]
  
      # First degree index
      expected_indices = [
          n_features - 1,
      ]
      # Second degree index
      expected_indices.append(
          int(n_features * (n_features + 1) // 2 + expected_indices[0])
      )
      # Third degree index
      expected_indices.append(
          int(
              n_features * (n_features + 1) * (n_features + 2) // 6
              + expected_indices[1]
          )
      )
  
      X = csr_container((data, (row, col)))
      pf = PolynomialFeatures(
          interaction_only=False, include_bias=False, degree=3
      )
      if sys.maxsize <= 2**32:
          msg = (
              r"The output that would result from the current configuration would"
              r" have \d*"
              r" features which is too large to be indexed"
          )
          with pytest.raises(ValueError, match=msg):
              pf.fit_transform(X)
      else:
          X_trans = pf.fit_transform(X)
          for idx in range(3):
              assert X_trans[0, expected_indices[idx]] == pytest.approx(
                  1.0
              )
  
imports: import sys
  import numpy
  import pytest
  from numpy.testing import assert_allclose, assert_array_equal
  from scipy import sparse
  from scipy.interpolate import BSpline
  from scipy.sparse import random
  from sklearn.linear_model import LinearRegression
  from sklearn.pipeline import Pipeline
  from sklearn.preprocessing import KBinsDiscretizer, PolynomialFeatures, SplineTransformer
  from sklearn.preprocessing._csr_polynomial_expansion import _calc_expanded_nnz, _calc_total_nnz, _get_sizeof_LARGEST_INT_t
  from sklearn.utils._testing import assert_array_almost_equal
  from sklearn.utils.fixes import CSC_CONTAINERS, CSR_CONTAINERS, parse_version, sp_version
label_desc: Use image node_id 36 for calling a global function with example usage: test_csr_polynomial_expansion_windows_fail(csr_container) without return types