code: def _check_x12(x12path=None):
      x12path = _find_x12(x12path)
      if not x12path:
          raise X13NotFoundError(
              "x12a and x13as not found on path. Give the "
              "path, put them on PATH, or set the "
              "X12PATH or X13PATH environmental variable."
          )
      return x12path
  
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 2 for calling a global function with example usage: _check_x12(x12path) and returns: x12path