\BLOCK{- set col_style = {
    'left':   '>{\\raggedright\\arraybackslash}X',
    'right':  '>{\\raggedleft\\arraybackslash}X',
    'center': '>{\\centering\\arraybackslash}X',
} -}
\BLOCK{- if caption -}
\begin{table}[H]
\centering
\caption{\VAR{caption}}
\BLOCK{if label -}
\label{\VAR{label}}
\BLOCK{- endif}
\vspace{0.5em}
\BLOCK{else}
\begin{center}
\BLOCK{- endif}
\BLOCK{- if is_large -}
\BLOCK{- endif}
\begin{tabularx}{\linewidth}{\BLOCK{- for column in columns}\VAR{col_style.get(column, '>{\\raggedright\\arraybackslash}X')}\BLOCK{- if not loop.last} \BLOCK{- endif}\BLOCK{- endfor}}
\toprule
\BLOCK{for row in rows -}
\BLOCK{- if row is none -}
\midrule
\BLOCK{ elif loop.first -}
\BLOCK{- for col in row -}
   \textbf{\VAR{col}}\BLOCK{- if not loop.last} & \BLOCK{else} \\
\BLOCK{endif}
\BLOCK{- endfor}
\midrule
\BLOCK{else -}
\BLOCK{- for col in row -}
   \VAR{col}\BLOCK{- if not loop.last} & \BLOCK{else} \\
\BLOCK{endif}
\BLOCK{- endfor -}
\BLOCK{- endif -}
\BLOCK{- endfor}
\bottomrule
\end{tabularx}
\BLOCK{- if is_large -}
\BLOCK{- endif}
\BLOCK{- if caption -}
\end{table}
\BLOCK{- else}
\end{center}
\BLOCK{- endif}
