<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def on_deleted(self, event):
 """ Event Handler when a file is deleted """

        key = 'filesystem:file_deleted'
        data = {
            'filepath': event.src_path,
            'is_directory': event.is_directory,
            'dirpath': os.path.dirname(event.src_path)
        }

        bmsg = BroadcastMessage(key=key, data=data)
        BroadcastManager.broadcast(bmsg)