input: Write a function to find the longest common substring between two texts.
  assert find_longest_common_substring('abcdefghi', 'acelgghi') == 'ghi'
  assert find_longest_common_substring('banana', 'bandana') == 'bana'
  assert find_longest_common_substring('helloworld', 'worldhello') == 'world'
output: def find_longest_common_substring(text1, text2):
      len1, len2 = len(text1), len(text2)
      max_len = 0
      end_index = 0
      dp = [[0] * (len2 + 1) for _ in range(len1 + 1)]
      
      for i in range(1, len1 + 1):
          for j in range(1, len2 + 1):
              if text1[i - 1] == text2[j - 1]:
                  dp[i][j] = dp[i - 1][j - 1] + 1
                  if dp[i][j] > max_len:
                      max_len = dp[i][j]
                      end_index = i
      
      return text1[end_index - max_len:end_index]