def METHOD_NAME(mocker):
    Patches = namedtuple("Patches", ["socket"])
    mock_patch = Patches(mocker.patch("socket.socket"))
    mock_patch.socket.recv.side_effect = [
        b"L",
        b"\x00\x00\x00\x0a",
        b"model_name",
        b"\x00\x00\x00\x0a",
        b"model_path",
        b"\x00\x00\x00\x01",
        b"\x00\x00\x00\x07",
        b"handler",
        b"\x00\x00\x00\x01",
        b"\x00\x00\x00\x08",
        b"envelope",
    ]
    return mock_patch