<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def to_env_var(env_var: str, value) -> str: """ Create an environment variable from a name and a value. This generates a shell-compatible representation of an environment variable that is assigned a YAML representation of a value. Args: env_var (str):
 Name of the environment variable. value (Any):
 A value we convert from. """

    val = to_yaml(value)
    ret_val = "%s=%s" % (env_var, escape_yaml(val))
    return ret_val