code: def test_singular():
      # Issue #7051
  
      np.random.seed(3423)
      n = 100
  
      data = np.random.randn(n, 2)
      df = pd.DataFrame(data, columns=["Y", "X"])
      df["class"] = pd.Series([i % 3 for i in df.index], index=df.index)
  
      with pytest.warns(Warning) as wrn:
          md = MixedLM.from_formula("Y ~ X", df, groups=df["class"])
          mdf = md.fit()
          mdf.summary()
          if not wrn:
              pytest.fail("warning expected")
  
imports: from statsmodels.compat.platform import PLATFORM_OSX
  import os
  import csv
  import warnings
  import numpy
  import pandas
  from scipy import sparse
  import pytest
  from statsmodels.regression.mixed_linear_model import MixedLM, MixedLMParams, _smw_solver, _smw_logdet
  from numpy.testing import assert_almost_equal, assert_equal, assert_allclose, assert_
  from statsmodels.base import _penalties
  import statsmodels.tools.numdiff
  from .results import lme_r_results
label_desc: Use image node_id 11 for calling a global function with example usage: test_singular() without return types