code: def test_extract_app_commands_from_file(
      filename, expected_commands, expected_line_numbers
  ):
      dir_path = os.path.dirname(os.path.realpath(__file__))
      test_file_path = os.path.join(
          dir_path, "testdata", "app_commands", filename
      )
  
      res = _extract_commands_from_file(file_name=test_file_path)
  
      assert res.file == test_file_path
      assert res.commands == expected_commands
      assert res.line_numbers == expected_line_numbers
  
file_path: pytorch-lightning/tests/tests_app/utilities/test_app_commands.py
imports: import os
  import sys
  import pytest
  from lightning.app.utilities.app_commands import CommandLines, _execute_app_commands, _extract_commands_from_file
  from lightning.app.utilities.exceptions import MisconfigurationException
label_desc: Use image node_id 1 for calling a global function with example usage: test_extract_app_commands_from_file(filename, expected_commands, expected_line_numbers) without return types