def mule_get_msg(signals=None, farms=None, buffer_size=65536, timeout=-1):
    """Block until a mule message is received and return it.

    This can be called from multiple threads in the same programmed mule.

    .. warning:: Bytes are returned for Python 3.

    :param bool signals: Whether to manage signals.

    :param bool farms: Whether to manage farms.

    :param int buffer_size:

    :param int timeout: Seconds.

    :rtype: bytes|str

    :raises ValueError: If not in a mule.
    """
