code: def compute_feature_targets(
      batch: Batch, config: ml_collections.ConfigDict
  ):
      """Compute the feature targets for feature regression.
  
      Args:
        batch: A single batch of data. This is updated with the feature target.
        config: The training configuration, used to generate the targets.
      """
      feature_target = config.masked_feature_loss.target
      if feature_target == avmae_base_model.FeatureTargets.RGB:
          batch["target_rgb"] = avmae_base_model.get_rgb_targets(
              batch["inputs"],
              tuple(config.model.patches.size),
              config.masked_feature_loss.get("select_central_frame"),
              config.masked_feature_loss.get(
                  "reconstruct_grayscale", False
              ),
              config.masked_feature_loss.get(
                  "standardise_per_patch", False
              ),
              config.masked_feature_loss.get(
                  "standardise_per_patch_channels", False
              ),
          )
      else:
          raise ValueError(
              f"Unsupported feature target: {feature_target}."
          )
  
imports: import functools
  from typing import Any, Callable, Dict, Iterator, Optional, Tuple, Type, Union
  from absl import logging
  from clu import metric_writers
  from clu import periodic_actions
  from flax import jax_utils
  import flax.linen
  import jax
  from jax.example_libraries.optimizers import clip_grads
  import jax.numpy
  import jax.profiler
  import ml_collections
  import numpy
  from scenic.common_lib import debug_utils
  from scenic.dataset_lib import dataset_utils
  from scenic.model_lib.base_models import base_model
  from scenic.projects.av_mae import base_model
  from scenic.projects.av_mae import train_utils
  from scenic.train_lib_deprecated import lr_schedules
  from scenic.train_lib_deprecated import optimizers
  from scenic.train_lib_deprecated import pretrain_utils
  from scenic.train_lib_deprecated import train_utils
label_desc: Use image node_id 2 for calling a global function with example usage: compute_feature_targets(batch, config) without return types