class_docstr: Concat ViT temporal encodings with T5 text encodings.
code: def __call__(
      self,
      features=None,
      encoder_input_tokens=None,
      encoder_segment_ids=None,
      enable_dropout=True,
  ):
      if features is not None:
          visual_embeddings = self.visual_encoder(
              features, train=enable_dropout
          )
          if self.proj_dim != 768:
              visual_embeddings = self.proj(visual_embeddings)
          if encoder_input_tokens is not None:
              x = self.t5_encoder(
                  encoder_input_tokens=encoder_input_tokens,
                  encoder_segment_ids=None,
                  enable_dropout=enable_dropout,
              )
              x = {"encoded": x, "mask": encoder_input_tokens > 0}
              cat = jnp.concatenate(
                  [visual_embeddings, x["encoded"]], axis=1
              )
              cat_mask = jnp.concatenate(
                  [
                      jnp.ones(visual_embeddings.shape[:2]) > 0,
                      x["mask"],
                  ],
                  axis=1,
              )
          else:
              cat = visual_embeddings
              cat_mask = jnp.ones(visual_embeddings.shape[:2]) > 0
      elif encoder_input_tokens is not None:
          x = self.t5_encoder(
              encoder_input_tokens=encoder_input_tokens,
              encoder_segment_ids=None,
              enable_dropout=enable_dropout,
          )
          cat = x
          cat_mask = encoder_input_tokens > 0
      else:
          raise NotImplementedError
      return {"encoded": cat, "mask": cat_mask}
  
imports: import functools
  from typing import Any, Dict, Mapping, Optional, Tuple
  from absl import logging
  import flax.linen
  from flax.training import common_utils
  import jax
  import jax.numpy
  import ml_collections
  from scenic.model_lib.base_models import base_model
  from scenic.model_lib.base_models import model_utils
  from scenic.projects.baselines import vit
  from scenic.projects.t5 import layers
  from scenic.projects.t5 import model
  from t5x import decoding
  from t5x.models import DecodeFnCallable
label_desc: Use image node_id 2 for calling the CatEncoder obj's underlying member method code with example usage: obj.__call__(features, encoder_input_tokens, encoder_segment_ids, enable_dropout) and returns: dict