def METHOD_NAME(debug, input, textable, normdata):
    base_path = os.path.dirname(__file__)
    filepath_input    = input    if os.path.isabs(input)    else os.path.join(base_path, input)
    filepath_textable = textable if os.path.isabs(textable) else os.path.join(base_path, textable)
    filepath_normdata = normdata if os.path.isabs(normdata) else os.path.join(base_path, normdata)
    handler = PhoneNumberContentHandler()
    parser = xml.sax.make_parser()
    parser.setContentHandler(handler)
    parser.parse(filepath_input)
    if debug:
        from pprint import pprint
        print(" • Textable phone number regular expression:")
        pprint(handler.get_regexps())
        print()
        print(" • Country number prefixes:")
        pprint(handler.get_normdata())
        print()
        return 0
    with open(filepath_textable, 'w') as file:
        file.write('\\+(?:')
        for idx, (country, regexps) in enumerate(handler.get_regexps()):
            if idx > 0:
                file.write('|')
            # Group regexp patterns by country dial code
            file.write(country)
            file.write('(?:')
            for idx, regexp in enumerate(regexps):
                if idx > 0:
                    file.write('|')
                file.write(regexp)
            file.write(')')
        file.write(')')
    with open(filepath_normdata, 'w') as file:
        writer = csv.writer(file)
        for country, data in handler.get_normdata():
            writer.writerow((country,) + data)