class_docstr: Adds elementwise type promotion to a Python reference implementation.
  
  Takes two kwargs, type_promoting_args and type_promotion_kind.
  
  type_promoting_args must be a string Sequence specifiying the argument names of all
  arguments that participate in type promotion (and should be type promoted). If the
  arg specifies a Sequence-type then every element of the Sequence will participate in
  type promotion.
  
  type_promotion_kind must be one of the kinds specified by ELEMENTWISE_TYPE_PROMOTION_KIND.
  See its documentation for details.
  
  The return_dtype will be coerced to the wrapped function's dtype arg if it is available and
  not None.
  
  Other type promotion behavior, like validating the Python type of scalar arguments, must
  be handled separately.
class_docstr_tok: ["Adds","elementwise","type","promotion","to","a","Python","reference","implementation",".","Takes","two","kwargs",",","type_promoting_args","and","type_promotion_kind",".","type_promoting_args","must","be","a","string","Sequence","specifiying","the","argument","names","of","all","arguments","that","participate","in","type","promotion","(","and","should","be","type","promoted",")",".","If","the","arg","specifies","a","Sequence-type","then","every","element","of","the","Sequence","will","participate","in","type","promotion",".","type_promotion_kind","must","be","one","of","the","kinds","specified","by","ELEMENTWISE_TYPE_PROMOTION_KIND",".","See","its","documentation","for","details",".","The","return_dtype","will","be","coerced","to","the","wrapped","function","'s","dtype","arg","if","it","is","available","and","not","None",".","Other","type","promotion","behavior",",","like","validating","the","Python","type","of","scalar","arguments",",","must","be","handled","separately","."]
code: def __init__(
      self,
      *,
      type_promotion_kind: ELEMENTWISE_TYPE_PROMOTION_KIND,
      type_promoting_args: Optional[Sequence[str]] = None,
  ):
      self.type_promoting_arg_names = type_promoting_args
      self.type_promotion_kind = type_promotion_kind
  
imports: import inspect
  import warnings
  from functools import wraps
  from itertools import chain
  from typing import Callable, NamedTuple, Optional, overload, Sequence, Tuple
  import torch
  import torch._prims_common
  from torch._prims_common import CustomOutParamAnnotation, ELEMENTWISE_TYPE_PROMOTION_KIND, Number, NumberType, ShapeType, TensorLike, TensorLikeType
  from torch.utils import _pytree
  from torch.utils._pytree import tree_flatten, tree_unflatten
label_desc: Use image node_id 1 to create a new elementwise_type_promotion_wrapper object  with example: obj = elementwise_type_promotion_wrapper()