def METHOD_NAME():
    """
    Validates that TorchServe returns reponse code 507 if there is OOM on model loading.
    """
    # Create model store directory
    pathlib.Path(test_utils.MODEL_STORE).mkdir(parents=True, exist_ok=True)
    # Start TorchServe
    test_utils.start_torchserve(no_config_snapshots=True)
    # Register model
    params = {
        "model_name": "BERTSeqClassification",
        "url": "https://torchserve.pytorch.org/mar_files/BERTSeqClassification.mar",
        "batch_size": 1,
        "initial_workers": 16,
    }
    response = test_utils.register_model_with_params(params)
    assert response.status_code == 507, "OOM Error expected"
    test_utils.stop_torchserve()