code: def test_polynomial_features_one_feature(
      single_feature_degree3,
      degree,
      include_bias,
      interaction_only,
      indices,
      X_container,
  ):
      """Test PolynomialFeatures on single feature up to degree 3."""
      X, P = single_feature_degree3
      if X_container is not None:
          X = X_container(X)
      tf = PolynomialFeatures(
          degree=degree,
          include_bias=include_bias,
          interaction_only=interaction_only,
      ).fit(X)
      out = tf.transform(X)
      if X_container is not None:
          out = out.toarray()
      assert_allclose(out, P[:, indices])
      if tf.n_output_features_ > 0:
          assert tf.powers_.shape == (
              tf.n_output_features_,
              tf.n_features_in_,
          )
  
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 20 for calling a global function with example usage: test_polynomial_features_one_feature(single_feature_degree3, degree, include_bias, interaction_only, indices, X_container) without return types