def parse_module(mod):
    """
    Collect AST objects from a python module
    """
    keys = dir(mod)
    assert 'AST' in keys
    asts = getattr(mod, 'AST')
    if type(asts) != dict:
        asts = {mod.__name__: asts}
    return asts
