code: def infer_typing_typevar_or_newtype(node, context=None):
      
      try:
          func = next(node.func.infer(context=context))
      except InferenceError as exc:
          raise UseInferenceDefault from exc
  
      if func.qname() not in TYPING_TYPEVARS_QUALIFIED:
          raise UseInferenceDefault
      if not node.args:
          raise UseInferenceDefault
  
      typename = node.args[0].as_string().strip("'")
      node = extract_node(TYPING_TYPE_TEMPLATE.format(typename))
      return node.infer(context=context)
docs: Infer a typing.TypeVar(...) or typing.NewType(...) call