Add support for custom-parsing/printing types to/from a type attribute.
Add support for custom-parsing/printing types to/from a type attribute.

PiperOrigin-RevId: 439851644

tensorflow/runtime,tensorflow/runtime,tensorflow/runtime,tensorflow/runtime