code: def t_invalid(
      formula_like, data, depth, exc=PatsyError
  ):  # pragma: no cover
      if isinstance(depth, int):
          depth += 1
      fs = [dmatrix, dmatrices]
      if have_pandas:
          fs += [dmatrix_pandas, dmatrices_pandas]
      for f in fs:
          try:
              f(formula_like, data, depth)
          except exc:
              pass
          else:
              raise AssertionError
  
imports: import sys
  import __future__
  import six
  import numpy
  import pytest
  from patsy import PatsyError
  from patsy.design_info import DesignMatrix, DesignInfo
  from patsy.eval import EvalEnvironment
  from patsy.desc import ModelDesc, Term, INTERCEPT
  from patsy.categorical import C
  from patsy.contrasts import Helmert
  from patsy.user_util import balanced, LookupFactor
  from patsy.build import design_matrix_builders, build_design_matrices
  from patsy.highlevel import *
  from patsy.util import have_pandas, have_pandas_categorical, have_pandas_categorical_dtype, pandas_Categorical_from_codes
  from patsy.origin import Origin
label_desc: Use image node_id 5 for calling a global function with example usage: t_invalid(formula_like, data, depth, exc) without return types