Checks whether a given AST (abstract syntax tree) object represents a 
    metametadata dictionary.

def IsMetaMetaDict(AST):
    """
    Checks whether a given AST (abstract syntax tree) object represents a 
    metametadata dictionary.   
    
    """
    isintpair = lambda x : (isinstance(x,Tuple) and (len(x.asList()) == 2) and 
                            isctype(x.asList()[0], int) and 
                            isctype(x.asList()[1], int))
    try:
        if ((len(AST.getChildren()) > 1) and 
            isinstance(AST.getChildren()[1], Stmt)):
            if isinstance(AST.getChildren()[1].getChildren()[0], Assign):
                [s, d] = AST.getChildren()[1].getChildren()[0].asList()
    except (TypeError, AttributeError):
        return False
    else:
        if (isinstance(s, AssName) and s.name == 'metametadata'):     
            if isinstance(d, Dict):
                return all([isctype(k, str) and 
                            (isctype(v, int) or isintpair(v)) 
                            for (k,v) in d.items])