def send(self, message_type, task_id, message):
x = <NUM_LIT:0><EOL>try:<EOL><INDENT>buffer = pickle.dumps((self.source_id,   <EOL>int(time.time()),  <EOL>message_type,<EOL>message))<EOL><DEDENT>except Exception as e:<EOL><INDENT>print("<STR_LIT>".format(e))<EOL>return<EOL><DEDENT>try:<EOL><INDENT>x = self.sock.sendto(buffer, (self.ip, self.port))<EOL><DEDENT>except socket.timeout:<EOL><INDENT>print("<STR_LIT>")<EOL>return False<EOL><DEDENT>return x<EOL>
Sends a message to the UDP receiver

        Parameter
        ---------

        message_type: monitoring.MessageType (enum)
            In this case message type is RESOURCE_INFO most often
        task_id: int
            Task identifier of the task for which resource monitoring is being reported
        message: object
            Arbitrary pickle-able object that is to be sent

        Returns:
            # bytes sent