class_docstr: This builder class ultimately constructs a TaskFlow task which is run at
  runtime (task execution time). This task generates and stores the test ENV_ID as well
  as any external resources requested (e.g.g IAM Roles, VPC, etc)
class_docstr_tok: ["This","builder","class","ultimately","constructs","a","TaskFlow","task","which","is","run","at","runtime","(","task","execution","time",")",".","This","task","generates","and","stores","the","test","ENV_ID","as","well","as","any","external","resources","requested","(","e.g.g","IAM","Roles",",","VPC",",","etc",")"]
docstr: Register a variable to fetch from environment or cloud parameter store
docstr_tok: ["Register","a","variable","to","fetch","from","environment","or","cloud","parameter","store"]
code: def add_variable(
      self,
      variable_name: str,
      split_string: bool = False,
      delimiter: str | None = None,
      optional: bool = False,
      **kwargs,
  ):
      """Register a variable to fetch from environment or cloud parameter store"""
      if variable_name in [
          variable.name for variable in self.variables
      ]:
          raise ValueError(
              f"Variable name {variable_name} already exists in the fetched variables list."
          )
  
      new_variable = Variable(
          name=variable_name,
          to_split=split_string,
          delimiter=delimiter,
          test_name=self.test_name,
          optional=optional,
      )
  
      # default_value is accepted via kwargs so that it is completely optional and no
      # default value needs to be provided in the method stub.  For example, if we
      # set it to None, we would have no way to know if that was our default or the
      # legitimate default value that the caller wishes to pass through.
      if "default_value" in kwargs:
          new_variable.set_default(kwargs["default_value"])
  
      self.variables.add(new_variable)
  
      return self
  
imports: from __future__ import annotations
  import inspect
  import json
  import logging
  import os
  import time
  from pathlib import Path
  from typing import TYPE_CHECKING
  from uuid import uuid4
  import boto3
  from botocore.exceptions import ClientError, NoCredentialsError
  from airflow.decorators import task
  from airflow.providers.amazon.aws.hooks.ssm import SsmHook
  from airflow.utils.state import State
  from airflow.utils.trigger_rule import TriggerRule
label_desc: Use image node_id 2 for calling the SystemTestContextBuilder obj's underlying member method code with example usage: obj.add_variable(variable_name, split_string, delimiter, optional) and returns: self