def get_multiprocessing_context():
    """Returns the preferred ``multiprocessing`` context for the current OS.

    When running on macOS or Linux with no start method configured, this method
    will set the default start method to ``"fork"``.

    Returns:
        a ``multiprocessing`` context
    """
    if (
        sys.platform in ("darwin", "linux")
        and multiprocessing.get_start_method(allow_none=True) is None
        and Version(platform.python_version()) < Version("3.14")
    ):
        # We prefer 'fork' because the startup time is shorter.
        # Also, note that we intentionally set the start method here so that
        # subsequent usage of things like `multiprocessing.Queue()` will not
        # cause the default start method to switch to 'spawn'
        multiprocessing.set_start_method("fork", force=True)

    return multiprocessing.get_context()
Returns the preferred ``multiprocessing`` context for the current OS.

    When running on macOS or Linux with no start method configured, this method
    will set the default start method to ``"fork"``.

    Returns:
        a ``multiprocessing`` context
    
fiftyone/core/utils.py