def METHOD_NAME(filename, mode='t'):
    """Returns the type of the model in file `filename`. Returns None
    if type is not known.
    mode: 'b' for binary, 't' for text. Not used currently.
    """
    mtype = None
    msubtype = None
    if mode == 't':
        for typename, typefunc in list(typeChecks.items()):
            if typefunc(filename):
                return typename
    return None