def METHOD_NAME(cls):
    if location in registry_algorithms and algorithm_type in registry_algorithms[location]:
        raise ValueError("Cannot have two algorithms with the same name")
    if location not in registry_algorithms:
        registry_algorithms[location] = {}
    registry_algorithms[location][algorithm_type] = cls()
    return cls