code: def tensor_space_impl(impl):
      
      if impl != 'numpy':
          # Shortcut to improve "import odl" times since most users do not use
          # non-numpy backends
          _initialize_if_needed()
  
      try:
          return TENSOR_SPACE_IMPLS[impl]
      except KeyError:
          raise ValueError("`impl` {!r} does not correspond to a valid tensor "
                           "space implmentation".format(impl))
docs: Tensor space class corresponding to the given impl name.
  
      Parameters
      ----------
      impl : str
          Name of the implementation, see `tensor_space_impl_names` for
          the full list.
  
      Returns
      -------
      tensor_space_impl : type
          Class inheriting from `TensorSpace`.
  
      Raises
      ------
      ValueError
          If ``impl`` is not a valid name of a tensor space imlementation.