code: def serving_output(
      self, output: TFBaseModelOutputWithPoolingAndNoAttention
  ) -> TFBaseModelOutputWithPoolingAndNoAttention:
      # hidden_states not converted to Tensor with tf.convert_to_tensor as they are all of different dimensions
      return TFBaseModelOutputWithPoolingAndNoAttention(
          last_hidden_state=output.last_hidden_state,
          pooler_output=output.pooler_output,
          hidden_states=output.hidden_states,
      )
  
imports: from typing import Dict, Optional, Tuple, Union
  import tensorflow
  from ...activations_tf import ACT2FN
  from ...modeling_tf_outputs import TFBaseModelOutputWithNoAttention, TFBaseModelOutputWithPoolingAndNoAttention, TFImageClassifierOutputWithNoAttention
  from ...modeling_tf_utils import TFPreTrainedModel, TFSequenceClassificationLoss, keras_serializable, unpack_inputs
  from ...tf_utils import shape_list
  from ...utils import add_code_sample_docstrings, add_start_docstrings, add_start_docstrings_to_model_forward, logging
  from .configuration_resnet import ResNetConfig
label_desc: Use image node_id 3 for calling the TFResNetModel obj's underlying member method code with example usage: obj.serving_output(output) and returns: TFBaseModelOutputWithPoolingAndNoAttention