def METHOD_NAME(model):
    try:
        # Recursively dump IR of all modules
        return _get_script_mod(model)._c.dump_to_str(True, False, False)
    except AttributeError:
        return model.graph.str()