code: def infer_typing_namedtuple_class(class_node, context=None):
      
      # Check if it has the corresponding bases
      annassigns_fields = [
          annassign.target.name
          for annassign in class_node.body
          if isinstance(annassign, nodes.AnnAssign)
      ]
      code = dedent(
          """
      from collections import namedtuple
      namedtuple({typename!r}, {fields!r})
      """
      ).format(typename=class_node.name, fields=",".join(annassigns_fields))
      node = extract_node(code)
      generated_class_node = next(infer_named_tuple(node, context))
      for method in class_node.mymethods():
          generated_class_node.locals[method.name] = [method]
      return iter((generated_class_node,))
docs: Infer a subclass of typing.NamedTuple