docstr: call recv[_multipart] in a way that raises if there is nothing to receive
code: def _select_recv(self, multipart, socket, **kwargs):
      """call recv[_multipart] in a way that raises if there is nothing to receive"""
      if zmq.zmq_version_info() >= (3, 1, 0):
          # zmq 3.1 has a bug, where poll can return false positives,
          # so we wait a little bit just in case
          # See LIBZMQ-280 on JIRA
          time.sleep(0.1)
  
      r, w, x = zmq.select(
          [socket], [], [], timeout=kwargs.pop("timeout", 5)
      )
      assert len(r) > 0, "Should have received a message"
      kwargs["flags"] = zmq.DONTWAIT | kwargs.get("flags", 0)
  
      recv = socket.recv_multipart if multipart else socket.recv
      return recv(**kwargs)
  
imports: import os
  import platform
  import signal
  import sys
  import time
  import warnings
  from functools import partial
  from threading import Thread
  from typing import List
  from unittest import SkipTest, TestCase
  from pytest import mark
  import zmq
  from zmq.utils import jsonapi
label_desc: Use image node_id 13 for calling the BaseZMQTestCase obj's underlying member method code with example usage: obj._select_recv(multipart, socket) and returns: recv