human
Complete this python program:
def infer_named_tuple(node, context=None):
assistant
#Here is the Python code you requested.

    """Specific inference function for namedtuple Call node
    """
    (class_node, name, attributes) = infer_func_form(node, nodes.Tuple._proxied, context=context)
    call_site = arguments.CallSite.from_call(node)
    func = next(extract_node('import    collections;    collections.namedtuple').infer())
    try:
        rename = next(call_site.infer_argument(func, 'rename', context)).bool_value()
    except InferenceError:
        rename = False
    if rename:
        attributes = _get_renamed_namedtuple_atributes(attributes)
    field_def = "                {name}    =    property(lambda    self:    self[{index:d}],    doc='Alias    for    field    number    {index:d}')"
    field_defs = '\n'.join((field_def.format(name=name, index=index) for (index, name) in enumerate(attributes)))
    fake = AstroidBuilder(MANAGER).string_build(('\nclass    %(name)s(tuple):\n                __slots__    =    ()\n                _fields    =    %(fields)r\n                def    _asdict(self):\n                                return    self.__dict__\n                @classmethod\n                def    _make(cls,    iterable,    new=tuple.__new__,    len=len):\n                                return    new(cls,    iterable)\n                def    _replace(self,    **kwds):\n                                return    self\n                def    __getnewargs__(self):\n                                return    tuple(self)\n%(field_defs)s\n                ' % {'name': name, 'fields': attributes, 'field_defs': field_defs}))
    class_node.locals['_asdict'] = fake.body[0].locals['_asdict']
    class_node.locals['_make'] = fake.body[0].locals['_make']
    class_node.locals['_replace'] = fake.body[0].locals['_replace']
    class_node.locals['_fields'] = fake.body[0].locals['_fields']
    for attr in attributes:
        class_node.locals[attr] = fake.body[0].locals[attr]
    return iter([class_node])