class_docstr: Metadata about a single field in a `tf.ExtensionType` object.
class_docstr_tok: ["Metadata","about","a","single","field","in","a","`","tf.ExtensionType","`","object","."]
docstr: Constructs a new ExtensionTypeField containing metadata for a single field.
  
  Args:
    name: The name of the new field (`str`).  May not be a reserved name.
    value_type: A python type expression constraining what values this field
      can take.
    default: The default value for the new field, or `NO_DEFAULT` if this
      field has no default value.
  
  Returns:
    A new `ExtensionTypeField`.
  
  Raises:
    TypeError: If the type described by `value_type` is not currently
        supported by `tf.ExtensionType`.
    TypeError: If `default` is specified and its type does not match
      `value_type`.
docstr_tok: ["Constructs","a","new","ExtensionTypeField","containing","metadata","for","a","single","field",".","Args",":","name",":","The","name","of","the","new","field","(","`","str","`",")",".","May","not","be","a","reserved","name",".","value_type",":","A","python","type","expression","constraining","what","values","this","field","can","take",".","default",":","The","default","value","for","the","new","field",",","or","`","NO_DEFAULT","`","if","this","field","has","no","default","value",".","Returns",":","A","new","`","ExtensionTypeField","`",".","Raises",":","TypeError",":","If","the","type","described","by","`","value_type","`","is","not","currently","supported","by","`","tf.ExtensionType","`",".","TypeError",":","If","`","default","`","is","specified","and","its","type","does","not","match","`","value_type","`","."]
code: def __new__(cls, name, value_type, default=NO_DEFAULT):
      """Constructs a new ExtensionTypeField containing metadata for a single field.
  
      Args:
        name: The name of the new field (`str`).  May not be a reserved name.
        value_type: A python type expression constraining what values this field
          can take.
        default: The default value for the new field, or `NO_DEFAULT` if this
          field has no default value.
  
      Returns:
        A new `ExtensionTypeField`.
  
      Raises:
        TypeError: If the type described by `value_type` is not currently
            supported by `tf.ExtensionType`.
        TypeError: If `default` is specified and its type does not match
          `value_type`.
      """
      try:
          validate_field_value_type(
              value_type, allow_forward_references=True
          )
      except TypeError as e:
          raise TypeError(f"In field {name!r}: {e}") from e
  
      if default is not cls.NO_DEFAULT:
          default = _convert_value(
              default,
              value_type,
              (f"default value for {name}",),
              _ConversionContext.DEFAULT,
          )
      return super(ExtensionTypeField, cls).__new__(
          cls, name, value_type, default
      )
  
imports: import collections
  import collections.abc
  import enum
  import typing
  from tensorflow.python.framework import composite_tensor
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import immutable_dict
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.framework import type_spec
  from tensorflow.python.util import type_annotations
label_desc: Use image node_id 1 for calling the ExtensionTypeField obj's underlying member method code with example usage: obj.__new__(cls, name, value_type, default) and returns: super