A namedtuple has the _fields attribute.
_fields
I use:
def is_namedtuple(v: Any): return isinstance(v, tuple) and hasattr(v, "_fields")