def __init__(self, routing, default, python_path):
def make(x):<EOL><INDENT>if isinstance(x, (list, str)):<EOL><INDENT>return ActionList(x)<EOL><DEDENT>assert isinstance(x, dict)<EOL>if '<STR_LIT>' in x or '<STR_LIT>' in x:<EOL><INDENT>x = dict(default, **x)<EOL>return construct.construct_type(x, python_path)<EOL><DEDENT>return {k: make(v) for k, v in x.items()}<EOL><DEDENT>routing = flatten.unflatten(routing)<EOL>self.routing = make(routing)<EOL>
:param dict routing: `routing` is a dict that maps addresses
   to lists of actions.

   The values in the input dictionary `routing` are recursively visited
   to build the routing table:

   * values that are strings or lists are used to construct ActionLists
   * dictionaries that contain "typename" or "datatype" keys are
     used to construct a class of that type.
   * otherwise, dictionaries are visited recursively
   * all other types are forbidden