def METHOD_NAME(cls, config: Dict[str, Any]) -> "TrialContext":
    """
    Create a context object suitable for debugging outside of Determined.
    An example for a subclass of :class:`~determined.pytorch._pytorch_trial.PyTorchTrial`:
    .. code-block:: python
        config = { ... }
        context = det.pytorch.PyTorchTrialContext.from_config(config)
        my_trial = MyPyTorchTrial(context)
        train_ds = my_trial.build_training_data_loader()
        for epoch_idx in range(3):
            for batch_idx, batch in enumerate(train_ds):
                metrics = my_trial.train_batch(batch, epoch_idx, batch_idx)
                ...
    An example for a subclass of :class:`~determined.keras._tf_keras_trial.TFKerasTrial`:
    .. code-block:: python
        config = { ... }
        context = det.keras.TFKerasTrialContext.from_config(config)
        my_trial = tf_keras_one_var_model.OneVarTrial(context)
        model = my_trial.build_model()
        model.fit(my_trial.build_training_data_loader())
        eval_metrics = model.evaluate(my_trial.build_validation_data_loader())
    Arguments:
        config: An experiment config file, in dictionary form.
    """
    core_context, env = det._make_local_execution_env(
        managed_training=False,
        test_mode=False,
        config=config,
        checkpoint_dir="/tmp",
        tensorboard_path=pathlib.Path("/tmp/tensorboard"),
        limit_gpus=1,
    )
    return cls(core_context, env)