# Path: matcher/utils.py
# def normalize_url(url):
#     for start in "http://", "https://", "www.":
#         url = remove_start(url, start)
#     return url.rstrip("/")
# 
# def any_upper(value):
#     return any(c.isupper() for c in value)


from collections import defaultdict
from unidecode import unidecode
from num2words import num2words
from .utils import normalize_url, any_upper
from enum import Enum
import re
    tail = strip_non_char_start(name[first_space:])

    if check_for_intials_match(name[:first_space], tail):
        return tail

    last_space = name.rfind(' ')
    if last_space == first_space:
        return
    head = strip_non_char_start(name[:last_space])
    if check_for_intials_match(name[last_space:], head):
        return head

def split_on_upper(name):
    upper_positions = [num for num, char in enumerate(name) if char.isupper()]

    xpos = 0
    for pos in upper_positions:
        text = name[xpos:pos].rstrip()
        if text:
            yield text
        xpos = pos
    text = name[xpos:].rstrip()
    if text:
        yield text

def split_on_upper_and_tidy(name):
    parts = [re_strip_non_chars.sub('', part) for part in split_on_upper(name)]
    return [part for part in parts if part]

def name_containing_initials(n1, n2):

# Path: matcher/utils.py
# def normalize_url(url):
#     for start in "http://", "https://", "www.":
#         url = remove_start(url, start)
#     return url.rstrip("/")
# 
# def any_upper(value):
#     return any(c.isupper() for c in value)


# Path: matcher/match.py
from collections import defaultdict
from unidecode import unidecode
from num2words import num2words
from .utils import normalize_url, any_upper
from enum import Enum
import re

    tail = strip_non_char_start(name[first_space:])

    if check_for_intials_match(name[:first_space], tail):
        return tail

    last_space = name.rfind(' ')
    if last_space == first_space:
        return
    head = strip_non_char_start(name[:last_space])
    if check_for_intials_match(name[last_space:], head):
        return head

def split_on_upper(name):
    upper_positions = [num for num, char in enumerate(name) if char.isupper()]

    xpos = 0
    for pos in upper_positions:
        text = name[xpos:pos].rstrip()
        if text:
            yield text
        xpos = pos
    text = name[xpos:].rstrip()
    if text:
        yield text

def split_on_upper_and_tidy(name):
    parts = [re_strip_non_chars.sub('', part) for part in split_on_upper(name)]
    return [part for part in parts if part]

def name_containing_initials(n1, n2):

    if not any_upper(n1) or not any_upper(n2):