code: def _backend_from_arg(backend):
      """Maps strings to known backends and validates the backend"""
  
      if isinstance(backend, str):
          try:
              backend = _named_backends[backend]
          except KeyError as e:
              raise ValueError(
                  "Unknown backend {}".format(backend)
              ) from e
  
      if backend.__ua_domain__ != "numpy.scipy.fft":
          raise ValueError(
              'Backend does not implement "numpy.scipy.fft"'
          )
  
      return backend
  
file_path: catboost/contrib/python/scipy/py3/scipy/fft/_backend.py
imports: import scipy._lib.uarray
  from .None import _pocketfft
label_desc: Use image node_id 1 for calling a global function with example usage: _backend_from_arg(backend) and returns: backend