def tabulate_body(<EOL>obj,<EOL>level_keys,<EOL>v_level_indexes,<EOL>h_level_indexes,<EOL>v_level_sort_keys=None,<EOL>h_level_sort_keys=None,<EOL>):
v_key_sorted = make_sorter(v_level_sort_keys, v_level_indexes)<EOL>h_key_sorted = make_sorter(h_level_sort_keys, h_level_indexes)<EOL>h_level_keys = [level_keys[level] for level in h_level_indexes]<EOL>v_level_keys = [level_keys[level] for level in v_level_indexes]<EOL>h_key_tuples = h_key_sorted(product(*h_level_keys))<EOL>v_key_tuples = v_key_sorted(product(*v_level_keys))<EOL>h_size = len(h_key_tuples)<EOL>v_size = len(v_key_tuples)<EOL>table = [[MISSING for _ in range(h_size)] for _ in range(v_size)]<EOL>for h_index, h_keys in enumerate(h_key_tuples):<EOL><INDENT>for v_index, v_keys in enumerate(v_key_tuples):<EOL><INDENT>key_path = [None] * len(level_keys)<EOL>merge_into_by_index(key_path, h_level_indexes, h_keys)<EOL>merge_into_by_index(key_path, v_level_indexes, v_keys)<EOL>for v_level, v_key in zip(v_level_indexes, v_keys):<EOL><INDENT>key_path[v_level] = v_key<EOL><DEDENT>item = obj<EOL>for key in key_path:<EOL><INDENT>try:<EOL><INDENT>item = item[key]<EOL><DEDENT>except (IndexError, KeyError):<EOL><INDENT>break<EOL><DEDENT><DEDENT>else:  <EOL><INDENT>table[v_index][h_index] = item<EOL><DEDENT><DEDENT><DEDENT>return table, v_key_tuples, h_key_tuples<EOL>
Args:
    v_level_indexes: A sequence of level indexes.
    h_level_indexes: A sequence of level indexes.