code: def test_format_input_env_variables():
      with pytest.raises(
          Exception, match="Invalid format of environment variable"
      ):
          _format_input_env_variables(("invalid-env",))
  
      with pytest.raises(
          Exception, match="Invalid format of environment variable"
      ):
          _format_input_env_variables(("=invalid",))
  
      with pytest.raises(
          Exception, match="Invalid format of environment variable"
      ):
          _format_input_env_variables(("=invalid=",))
  
      with pytest.raises(
          Exception, match="is duplicated. Please only include it once."
      ):
          _format_input_env_variables(
              (
                  "FOO=bar",
                  "FOO=bar",
              )
          )
  
      with pytest.raises(
          Exception,
          match="is not a valid name. It is only allowed to contain digits 0-9, letters A-Z",
      ):
          _format_input_env_variables(("*FOO#=bar",))
  
      assert _format_input_env_variables(("FOO=bar", "BLA=bloz")) == {
          "FOO": "bar",
          "BLA": "bloz",
      }
  
file_path: pytorch-lightning/tests/tests_app/utilities/test_cli_helpers.py
imports: import os
  import sys
  from unittest.mock import Mock, patch
  import arrow
  import lightning.app
  import pytest
  from lightning.app.utilities.cli_helpers import _arrow_time_callback, _check_environment_and_redirect, _format_input_env_variables, _get_newer_version
label_desc: Use image node_id 1 for calling a global function with example usage: test_format_input_env_variables() without return types