def METHOD_NAME(context: BaseContext, monkeypatch) -> TCPPortSelector:
    # Registering TCPPortSelector as a proxy object, making it multiprocessing-safe
    # Registering the MonkeyPatch class in order to execute monkeypatch.setattr on the managed
    # process
    SyncManager.register("TCPPortSelector", TCPPortSelector)
    SyncManager.register("MonkeyPatch", MonkeyPatch)
    manager = context.Manager()
    monkeypatch_proxy = manager.MonkeyPatch(monkeypatch)  # type: ignore[attr-defined]
    monkeypatch_proxy.setattr(
        "infection_monkey.network.info.psutil.net_connections", unavailable_ports
    )
    return manager.TCPPortSelector()  # type: ignore[attr-defined]