docs: def recv_arrays(socket):
      """Receive a list of NumPy arrays.
  
      Parameters
      ----------
      socket : :class:`zmq.Socket`
          The socket to receive the arrays on.
  
      Returns
      -------
      list
          A list of :class:`numpy.ndarray` objects.
  
      Raises
      ------
      StopIteration
          If the first JSON object received contains the key `stop`,
          signifying that the server has finished a single epoch.
  
      """
      headers = socket.recv_json()
      if 'stop' in headers:
          raise StopIteration
      arrays = []
      for header in headers:
          data = socket.recv(copy=False)
          buf = buffer_(data)
          array = numpy.frombuffer(buf, dtype=numpy.dtype(header['descr']))
          array.shape = header['shape']
          if header['fortran_order']:
              array.shape = header['shape'][::-1]
              array = array.transpose()
          arrays.append(array)
      return arrays