code: def _select_backend(
      backend: Framework = Framework.TENSORFLOW,
  ) -> Union[Type["_TensorFlowBackend"], Type["_PytorchBackend"]]:
      """
      Selects the backend according to the `backend` flag.
  
      Parameters
      ---------
      backend
          Deep learning backend.
      """
      # Check if pytorch/tensorflow backend supported.
      if (backend == Framework.PYTORCH and not has_pytorch) or (
          backend == Framework.TENSORFLOW and not has_tensorflow
      ):
          raise ImportError(
              f"{backend} not installed. Cannot initialize and run the GradientExplainer"
              f" with {backend} backend."
          )
  
      # Allow only pytorch and tensorflow.
      elif backend not in [Framework.PYTORCH, Framework.TENSORFLOW]:
          raise NotImplementedError(
              f"{backend} not implemented. Use `tensorflow` or `pytorch` instead."
          )
  
      return (
          _TensorFlowBackend
          if backend == Framework.TENSORFLOW
          else _PytorchBackend
      )
  
label_desc: Use image node_id 1 for calling a global function with example usage: _select_backend(backend) and returns: unknown