def _get_model(model: str):
    """Returns the corresponding class in case the model passed is a string."""
    if isinstance(model, str):
        if model in models_dict:
            model = models_dict[model]
        else:
            raise ValueError(f"Unknown model name {model!r}.")
    return model
Returns the corresponding class in case the model passed is a string.
braindecode/eegneuralnet.py