docstr: Construct a step card tab with supported HTML template.
  
  :param name: a string representing the name of the tab.
  :param template: a string representing the HTML template for the card content.
docstr_tok: ["Construct","a","step","card","tab","with","supported","HTML","template",".",":","param","name",":","a","string","representing","the","name","of","the","tab",".",":","param","template",":","a","string","representing","the","HTML","template","for","the","card","content","."]
code: def __init__(self, name: str, template: str) -> None:
      """
      Construct a step card tab with supported HTML template.
  
      :param name: a string representing the name of the tab.
      :param template: a string representing the HTML template for the card content.
      """
      import jinja2
      from jinja2 import meta as jinja2_meta
  
      self.name = name
      self.template = template
  
      j2_env = jinja2.Environment()
      self._variables = jinja2_meta.find_undeclared_variables(
          j2_env.parse(template)
      )
      self._context = {}
  
imports: from __future__ import annotations
  import base64
  import html
  import logging
  import os
  import pathlib
  import pickle
  import random
  import re
  import string
  from io import StringIO
  from typing import Optional, Union
  from packaging.version import Version
  from mlflow.exceptions import INVALID_PARAMETER_VALUE, MlflowException
label_desc: Use image node_id 1 to create a new CardTab object  with example: obj = CardTab(name, template)