code: def test_create_multiple_error_message():
      query = "York"
      namesakes: List[Namesake] = [
          Namesake(
              "York",
              [
                  NamesakeParent("Illinois", LevelKind.state),
                  NamesakeParent("USA", LevelKind.country),
              ],
          ),
          Namesake(
              "New York",
              [
                  NamesakeParent("New York", LevelKind.county),
                  NamesakeParent("New York", LevelKind.state),
                  NamesakeParent("USA", LevelKind.country),
              ],
          ),
      ]
  
      total_namesake_count = 2
      text = _create_multiple_error_message(
          query, namesakes, total_namesake_count
      )
  
      expected_lines = []
      for namesake in namesakes:
          expected_line = "\n- " + namesake.name
          if len(namesake.parents) > 0:
              expected_line += (
                  " ("
                  + ", ".join([o.name for o in namesake.parents])
                  + ")"
              )
          expected_lines.append(expected_line)
  
      expected_text = (
          "Multiple objects ("
          + str(total_namesake_count)
          + ") were found for "
          + query
          + ":"
          + expected_lines[0]
          + expected_lines[1]
      )
  
      assert text == expected_text
  
file_path: lets-plot/python-package/test/geo_data/test_response_errors.py
imports: from typing import List
  import pytest
  from lets_plot.geo_data.gis.response import Namesake, LevelKind, FeatureBuilder, NamesakeParent, AmbiguousFeature, AmbiguousResponse, ErrorResponse
  from lets_plot.geo_data.geocodes import _create_multiple_error_message, _format_error_message
  from geo_data_test_util import ERROR_MESSAGE, make_ambiguous_response, make_error_response
label_desc: Use image node_id 4 for calling a global function with example usage: test_create_multiple_error_message() without return types