code: def xor_trial_controller(request):
      """
      This fixture provides a function that takes a hyperparameter dictionary as input and
      returns a trial controller. It is parameterized over different implementations, so that any test
      that uses it may test a full set of implementations.
      """
  
      def _xor_trial_controller(
          hparams: Dict[str, Any],
          workloads: workload.Stream,
          scheduling_unit: int = 1,
          trial_seed: int = 0,
          checkpoint_dir: Optional[str] = None,
          latest_checkpoint: Optional[Dict[str, Any]] = None,
          steps_completed: int = 0,
      ) -> det.TrialController:
          return utils.make_trial_controller_from_trial_implementation(
              request.param,
              hparams,
              workloads,
              scheduling_unit=scheduling_unit,
              trial_seed=trial_seed,
              checkpoint_dir=checkpoint_dir,
              latest_checkpoint=latest_checkpoint,
              steps_completed=steps_completed,
          )
  
      return _xor_trial_controller
  
imports: import os
  from pathlib import Path
  from typing import Any, Callable, Dict, List, Optional
  import pytest
  import tensorflow
  from packaging import version
  import determined
  from determined import keras, workload
  from tests.experiment import utils
  from tests.experiment.fixtures import tf_keras_xor_model
label_desc: Use image node_id 2 for calling a global function with example usage: xor_trial_controller(request) and returns: _xor_trial_controller, utils