def parse_vertex_and_square_ids(
    data: str, start_string: str = "Square ID", end_string: str = "# Edges",
) -> dict:
    """Return a dictionary of vertex ID & square ID pairs.

    This function will parse through the read-in input data between ''start_string'' and ''end_string''
    to return the filtered text in-between. 
    This text is then converted to a dictionary mapping vertex IDs to square IDs.

    :param data: read-in input file
    :type data: str
    :param start_string: starting string to search from, defaults to 'Square ID'
    :type start_string: str
    :param end_string: ending string to search until, defaults to '# Edges'
    :type end_string: str
    :return: a dictionary of vertex IDs & corresponding square IDs
    :rtype: dict
    """
    # split the data on the two strings
    list_of_ids = data.split(start_string)[-1].split(end_string)[0]
    # split the data on newline character
    list_of_ids = list_of_ids.split("\n")
    # remove empty strings that arose due to whitespace by using filter
    list_of_ids = list(filter(lambda x: x != "", list_of_ids))

    # create a dictionary of key-value pairs by splitting on the comma character
    ids_map = {}
    for i in list_of_ids:
        splitted_string = i.split(",")
        vertex_id = splitted_string[0]
        square_id = int(splitted_string[1])

        # create a mapping
        ids_map[vertex_id] = square_id

    return ids_map