<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _agent_import_failed(trace):
 """Returns dummy agent class for if PyTorch etc. is not installed."""


    class _AgentImportFailed(Trainer):
        _name = "AgentImportFailed"
        _default_config = with_common_config({})

        def _setup(self, config):
            raise ImportError(trace)

    return _AgentImportFailed