code: def _clean_order(order):
      """
      Takes something like (1 1 0)(0 1 1) and returns a arma order, sarma
      order tuple. Also accepts (1 1 0) and return arma order and (0, 0, 0)
      """
      order = re.findall(r"\([0-9 ]*?\)", order)
  
      def clean(x):
          return tuple(map(int, re.sub("[()]", "", x).split(" ")))
  
      if len(order) > 1:
          order, sorder = map(clean, order)
      else:
          order = clean(order[0])
          sorder = (0, 0, 0)
  
      return order, sorder
  
imports: from statsmodels.compat.pandas import deprecate_kwarg
  import os
  import subprocess
  import tempfile
  import re
  from warnings import warn
  import pandas
  from statsmodels.tools.tools import Bunch
  from statsmodels.tools.sm_exceptions import X13NotFoundError, IOWarning, X13Error, X13Warning
label_desc: Use image node_id 3 for calling a global function with example usage: _clean_order(order) and returns: order,  sorder, tuple