def footprint(params):
  """Union of dataset features for multi-tasking.

  Combining datasets is only possible if each has the same input features
  footprint, so here we define a default features dictionary with dummy inputs
  that will be overwritten as necessary by client datasets.

  Args:
    params: Dictionary of model settings.

  Returns:
    features: Dictionary of TF tensors.
  """
  question_length = params.get("question_length", 1)
  answer_length = params.get("answer_length", 1)
  caption_length = params.get("caption_length", 1)
  condition_length = params.get("condition_length", 1)
  num_image_regions = params.get("num_image_regions", 1)
  image_feature_size = params.get("image_feature_size", 1)
  features = dict(
      input_type=DatasetTypes.NONE,
      image_id=np.int64(0),
      question_id=np.int64(-1),
      question_inputs=text_utils.TextInputs(
          token_ids=np.zeros([question_length], dtype=np.int32),
          mask=np.zeros([question_length], dtype=np.int32),
          segment_ids=np.zeros([question_length], dtype=np.int32),
          positions=np.zeros([question_length], dtype=np.int32)),
      answer_inputs=text_utils.TextInputs(
          token_ids=np.zeros([answer_length], dtype=np.int32),
          mask=np.zeros([answer_length], dtype=np.int32),
          segment_ids=np.zeros([answer_length], dtype=np.int32),
          positions=np.zeros([answer_length], dtype=np.int32)),
      answer_outputs=text_utils.TextOutputs(
          token_ids=np.zeros([answer_length - 1], dtype=np.int32),
          mask=np.zeros([answer_length - 1], dtype=np.int32)),
      token_inputs=text_utils.TextInputs(
          token_ids=np.zeros([caption_length - 1], dtype=np.int32),
          mask=np.zeros([caption_length - 1], dtype=np.int32),
          segment_ids=np.zeros([caption_length - 1], dtype=np.int32),
          positions=np.zeros([caption_length - 1], dtype=np.int32)),
      token_outputs=text_utils.TextOutputs(
          token_ids=np.zeros([caption_length - 1], dtype=np.int32),
          mask=np.zeros([caption_length - 1], dtype=np.int32)),
      object_features=image_utils.ObjectDetectionOutput(
          features=np.zeros([num_image_regions, image_feature_size],
                            dtype=np.float32),
          positions=np.zeros([num_image_regions], dtype=np.int32),
          mask=np.zeros([num_image_regions], dtype=np.int32)))
  if params.get("conditional_decoding"):
    features["condition_inputs"] = text_utils.TextInputs(
        token_ids=np.zeros([condition_length], dtype=np.int32),
        mask=np.zeros([condition_length], dtype=np.int32),
        segment_ids=np.zeros([condition_length], dtype=np.int32),
        positions=np.zeros([condition_length], dtype=np.int32))

  return features
Union of dataset features for multi-tasking.

  Combining datasets is only possible if each has the same input features
  footprint, so here we define a default features dictionary with dummy inputs
  that will be overwritten as necessary by client datasets.

  Args:
    params: Dictionary of model settings.

  Returns:
    features: Dictionary of TF tensors.
  
language/capwap/datasets/__init__.py