human
Python code to detect type of namedtuple.
assistant
Here is a Python code to detect type of namedtuple

import collections

def is_namedtuple(obj):
        """Detect type of namedtuple.
        """
        return isinstance(obj, tuple) and hasattr(obj, '_fields')

# Enter the namedtuple
namedtuple = collections.namedtuple('namedtuple', 'a b')

# Calling the function
print((is_namedtuple(namedtuple)))

#Example Output
# False

#Remember to inspect code for bugs.