code: def test_valid_max_order_edges(endog, max_order, kwargs):
      fit = pm.auto_arima(endog, max_order=max_order, **kwargs)
      order = fit.order
      ssnal = fit.seasonal_order
      assert (sum(order) + sum(ssnal[:3])) <= max_order
  
imports: import numpy
  import pandas
  import pmdarima
  from pmdarima.arima import auto
  from pmdarima.arima.utils import nsdiffs
  from pmdarima.warnings import ModelFitWarning
  from pmdarima.compat.pytest import pytest_error_str, pytest_warning_messages
  from numpy.testing import assert_allclose
  from numpy.testing import assert_array_almost_equal
  import os
  from os.path import abspath, dirname
  import pytest
label_desc: Use image node_id 17 for calling a global function with example usage: test_valid_max_order_edges(endog, max_order, kwargs) without return types