code: def get_trendorder(trend="c"):
      # Handle constant, etc.
      if trend == "c":
          trendorder = 1
      elif trend in ("n", "nc"):
          trendorder = 0
      elif trend == "ct":
          trendorder = 2
      elif trend == "ctt":
          trendorder = 3
      else:
          raise ValueError(f"Unkown trend: {trend}")
      return trendorder
  
file_path: statsmodels/statsmodels/tsa/vector_ar/util.py
imports: from statsmodels.compat.pandas import frequencies
  from statsmodels.compat.python import asbytes
  from statsmodels.tools.validation import array_like, int_like
  import numpy
  import pandas
  from scipy import stats, linalg
  import statsmodels.tsa.tsatools
label_desc: Use image node_id 2 for calling a global function with example usage: get_trendorder(trend) and returns: trendorder