class_docstr: A class to represent different backends.
class_docstr_tok: ["A","class","to","represent","different","backends","."]
code: def __new__(cls, name: str):
      backend = getattr(Backend, name.upper(), Backend.UNRECOGNIZED)
      if backend == Backend.UNRECOGNIZED:
          raise ValueError(
              "Unrecognized backend: '{}'. Only NCCL is supported".format(
                  name
              )
          )
      if backend == Backend.MPI:
          raise RuntimeError("Ray does not support MPI backend.")
      return backend
  
file_path: ray/python/ray/util/collective/types.py
imports: from enum import Enum
  from dataclasses import dataclass
  from datetime import timedelta
label_desc: Use image node_id 1 for calling the Backend obj's underlying member method code with example usage: obj.__new__(cls, name) and returns: backend