code: def call(
      self,
      hidden_state: tf.Tensor,
      output_hidden_states: bool = False,
      return_dict: bool = True,
  ) -> TFBaseModelOutputWithNoAttention:
      hidden_states = () if output_hidden_states else None
  
      for stage_module in self.stages:
          if output_hidden_states:
              hidden_states = hidden_states + (hidden_state,)
  
          hidden_state = stage_module(hidden_state)
  
      if output_hidden_states:
          hidden_states = hidden_states + (hidden_state,)
  
      if not return_dict:
          return tuple(
              v for v in [hidden_state, hidden_states] if v is not None
          )
  
      return TFBaseModelOutputWithNoAttention(
          last_hidden_state=hidden_state, hidden_states=hidden_states
      )
  
imports: from typing import Optional, Tuple, Union
  import tensorflow
  from ...activations_tf import ACT2FN
  from ...file_utils import add_code_sample_docstrings, add_start_docstrings, add_start_docstrings_to_model_forward
  from ...modeling_tf_outputs import TFBaseModelOutputWithNoAttention, TFBaseModelOutputWithPoolingAndNoAttention, TFSequenceClassifierOutput
  from ...modeling_tf_utils import TFPreTrainedModel, TFSequenceClassificationLoss, keras_serializable, unpack_inputs
  from ...tf_utils import shape_list
  from ...utils import logging
  from .configuration_regnet import RegNetConfig
label_desc: Use image node_id 2 for calling the TFRegNetEncoder obj's underlying member method code with example usage: obj.call(hidden_state, output_hidden_states, return_dict) and returns: TFBaseModelOutputWithNoAttention, tuple