code: def extract_patterns(lines, start_pattern, end_pattern):
      """Extracts a variables from start_pattern to end_pattern.
  
      Arguments
      ---------
      lines: list
          List of strings to parse.
      start_pattern: string
          String that indicated the start of the pattern.
      end_pattern: string
          String that indicated the end of the pattern.
  
      Returns
      -------
      var_lst: list
          List of variables detected.
      """
      var_lst = []
  
      for line in lines:
          start_indexes = [
              index
              for index in range(len(line))
              if line.startswith(start_pattern, index)
          ]
          for index in start_indexes:
              start_var = index + len(start_pattern)
              line_src = line[start_var:]
              var_name = ""
              for char in line_src:
                  if char in end_pattern:
                      break
                  var_name = var_name + char
              var_lst.append(var_name)
      return var_lst
  
imports: import os
  import re
  from speechbrain.core import run_opt_defaults
label_desc: Use image node_id 4 for calling a global function with example usage: extract_patterns(lines, start_pattern, end_pattern) and returns: var_lst