code: def _check_args(
      endog, exog, exog_scale, exog_smooth, exog_noise, time, groups
  ):
      v = [
          len(endog),
          exog.shape[0],
          exog_scale.shape[0],
          exog_smooth.shape[0],
          len(time),
          len(groups),
      ]
  
      if exog_noise is not None:
          v.append(exog_noise.shape[0])
  
      if min(v) != max(v):
          msg = (
              "The leading dimensions of all array arguments "
              + "must be equal."
          )
          raise ValueError(msg)
  
imports: import numpy
  import pandas
  import patsy
  import statsmodels.base.model
  from statsmodels.regression.linear_model import OLS
  import collections
  from scipy.optimize import minimize
  from statsmodels.iolib import summary2
  from statsmodels.tools.numdiff import approx_fprime
  import warnings
label_desc: Use image node_id 1 for calling a global function with example usage: _check_args(endog, exog, exog_scale, exog_smooth, exog_noise, time, groups) without return types