class_docstr: An environment for running on clusters with processes created through MPI.
  
  Requires the installation of the `mpi4py` package. See also: https://github.com/mpi4py/mpi4py
docstr: Returns ``True`` if the `mpi4py` package is installed and MPI returns a world size greater than 1.
docstr_tok: ["Returns","``","True","``","if","the","`","mpi4py","`","package","is","installed","and","MPI","returns","a","world","size","greater","than","1","."]
code: def detect() -> bool:
      """Returns ``True`` if the `mpi4py` package is installed and MPI returns a world size greater than 1."""
      if not _MPI4PY_AVAILABLE:
          return False
  
      from mpi4py import MPI
  
      return MPI.COMM_WORLD.Get_size() > 1
  
imports: import logging
  import socket
  from functools import lru_cache
  from typing import Optional
  from lightning_utilities.core.imports import RequirementCache
  from typing_extensions import override
  from lightning.fabric.plugins.environments.cluster_environment import ClusterEnvironment
  from lightning.fabric.plugins.environments.lightning import find_free_network_port
label_desc: Use image node_id 5 for calling the MPIEnvironment obj's underlying member method code with example usage: obj.detect() and returns: unknown, False