<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def send(self, uid, event, payload=None):
 """ Send an event to a connected controller. Use pymlgame event type and correct payload. To send a message to the controller use pymlgame.E_MESSAGE event and a string as payload. :param uid: Unique id of the controller :param event: Event type :param payload: Payload of the event :type uid: str :type event: Event :type payload: str :return: Number of bytes send or False :rtype: int """

        sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
        if uid in self.controllers.keys():
            addr = self.controllers[uid][0]
            port = self.controllers[uid][1]
            if event == E_MESSAGE:
                #print('/message/{} => {}:{}'.format(payload, addr, port))
                return sock.sendto('/message/{}'.format(payload).encode('utf-8'), (addr, port))
            elif event == E_RUMBLE:
                #print('/rumble/{} => {}:{}'.format(payload, addr, port))
                return sock.sendto('/rumble/{}'.format(payload).encode('utf-8'), (addr, port))
            else:
                pass
        else:
            pass
        return False