code: def test_num_combinations(
      n_features,
      min_degree,
      max_degree,
      interaction_only,
      include_bias,
      csr_container,
  ):
      """
      Test that n_output_features_ is calculated correctly.
      """
      x = csr_container(([1], ([0], [n_features - 1])))
      est = PolynomialFeatures(
          degree=max_degree,
          interaction_only=interaction_only,
          include_bias=include_bias,
      )
      est.fit(x)
      num_combos = est.n_output_features_
  
      combos = PolynomialFeatures._combinations(
          n_features=n_features,
          min_degree=0,
          max_degree=max_degree,
          interaction_only=interaction_only,
          include_bias=include_bias,
      )
      assert num_combos == sum([1 for _ in combos])
  
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 26 for calling a global function with example usage: test_num_combinations(n_features, min_degree, max_degree, interaction_only, include_bias, csr_container) without return types