parameters: (cls)
docstring: Wraps a user-defined constructor for tf.ExtensionType subclass `cls`.
docstring_summary: Wraps a user-defined constructor for tf.ExtensionType subclass `cls`.
docstring_tokens: Wraps a user - defined constructor for tf . ExtensionType subclass cls .
function: def _wrap_user_constructor(cls):
    """Wraps a user-defined constructor for tf.ExtensionType subclass `cls`."""
    user_constructor = cls.__init__
  
    def wrapped_init(self, *args, **kwargs):
      self.__dict__[_IN_CONSTRUCTOR] = True
      user_constructor(self, *args, **kwargs)
      del self.__dict__[_IN_CONSTRUCTOR]
  
      self._tf_extension_type_convert_fields()  # pylint: disable=protected-access
      self.__validate__()
  
    cls.__init__ = tf_decorator.make_decorator(user_constructor, wrapped_init)
function_tokens: def _wrap_user_constructor ( cls ) : user_constructor = cls . __init__ def wrapped_init ( self , * args , * * kwargs ) : self . __dict__ [ _IN_CONSTRUCTOR ] = True user_constructor ( self , * args , * * kwargs ) del self . __dict__ [ _IN_CONSTRUCTOR ] self . _tf_extension_type_convert_fields ( ) # pylint: disable=protected-access self . __validate__ ( ) cls . __init__ = tf_decorator . make_decorator ( user_constructor , wrapped_init )