code: def reorderm(
      table: Dict[Any, Dict[Any, Iterable[Any]]],
      order: Tuple[int, int, int],
  ) -> Dict[Any, Dict[Any, Set[Any]]]:
      """Handles shuffles for a particular kind of table."""
      ret = {}
      for k, m in table.items():
          for k2, vs in m.items():
              for v in vs:
                  fields = [k, k2, v]
                  innerm = ret.setdefault(fields[order[0]], {})
                  acc = innerm.setdefault(fields[order[1]], set())
                  acc.add(fields[order[2]])
  
      return ret
  
imports: import getpass
  import itertools
  import os
  import platform
  import sys
  from enum import Enum
  from typing import Any, Callable, Dict, Iterable, List, NamedTuple, Optional, Set, Tuple, Union
  from blessings import Terminal
  from pkg_resources import resource_filename
label_desc: Use image node_id 11 for calling a global function with example usage: reorderm(table, order) and returns: ret