# Path: src/formpack/utils/array_to_xpath.py
# def array_to_xpath(outer_arr, fns={}):
#     flattened = array_to_xpath.array_to_flattened_array(outer_arr, fns)
#     return array_to_xpath.flattened_array_to_padded_string(flattened)
# 
# Path: src/formpack/utils/replace_aliases.py
# SELECT_TYPES = list(selects.keys())
# 
# Path: src/formpack/constants.py
# UNTRANSLATED = None
# 
# OR_OTHER_COLUMN = '_or_other'
# 
# TAG_COLUMNS_AND_SEPARATORS = {
#     # Separators are used when flattening tags into a single column. Keys are
#     # column names, values are separators.
#     'hxl': '',
# }


import re
from collections import defaultdict, OrderedDict
from copy import deepcopy
from functools import reduce
from .array_to_xpath import array_to_xpath
from .replace_aliases import SELECT_TYPES
from ..constants import (
    UNTRANSLATED,
    OR_OTHER_COLUMN,
    TAG_COLUMNS_AND_SEPARATORS,
)
# -*- coding: utf-8 -*-



def flatten_content_in_place(
    survey_content,
    remove_columns=None,

# Path: src/formpack/utils/array_to_xpath.py
# def array_to_xpath(outer_arr, fns={}):
#     flattened = array_to_xpath.array_to_flattened_array(outer_arr, fns)
#     return array_to_xpath.flattened_array_to_padded_string(flattened)
# 
# Path: src/formpack/utils/replace_aliases.py
# SELECT_TYPES = list(selects.keys())
# 
# Path: src/formpack/constants.py
# UNTRANSLATED = None
# 
# OR_OTHER_COLUMN = '_or_other'
# 
# TAG_COLUMNS_AND_SEPARATORS = {
#     # Separators are used when flattening tags into a single column. Keys are
#     # column names, values are separators.
#     'hxl': '',
# }


# Path: src/formpack/utils/flatten_content.py
import re
from collections import defaultdict, OrderedDict
from copy import deepcopy
from functools import reduce
from .array_to_xpath import array_to_xpath
from .replace_aliases import SELECT_TYPES
from ..constants import (
    UNTRANSLATED,
    OR_OTHER_COLUMN,
    TAG_COLUMNS_AND_SEPARATORS,
)

# -*- coding: utf-8 -*-



def flatten_content_in_place(
    survey_content,
    remove_columns=None,

    remove_sheets=None,