code: def _adapt_data_from_fit_args(
      x: Any,
      y: Any,
      sample_weight: Any,
      batch_size: int,
  ) -> Any:
      """
      This is the in-between layer from the Native API to the Trial API.
      """
      if isinstance(
          x, (tf.data.Dataset, tf.keras.utils.Sequence, SequenceAdapter)
      ):
          if y is not None:
              raise det.errors.InvalidDataTypeException(
                  type(y),
                  "If x is a keras.utils.Sequence or a tf.data.Dataset, "
                  "y should not be specified (since targets will be obtained from x)."
                  "See the instruction below for details: "
                  f"\n{keras.TFKerasTrial.build_training_data_loader.__doc__}",
              )
          return x
  
      return _ArrayLikeAdapter(x, y, batch_size, sample_weight)
  
file_path: determined/harness/determined/keras/_data.py
imports: import math
  from typing import Any, Dict, List, Optional, Tuple, Union
  import numpy
  import tensorflow
  import determined
  from determined import keras
  from determined.common import check
label_desc: Use image node_id 6 for calling a global function with example usage: _adapt_data_from_fit_args(x, y, sample_weight, batch_size) and returns: _ArrayLikeAdapter, x