def _register_plugin_callbacks(self, callbacks):
        # Initialize variable to hold events callback IDs
        callback_ids = defaultdict(list)

        # Loop through list of dictionaries
        for callback in callbacks:
            # Loop through all events the callback should be registered to
            for event_name in callback['event_names']:
                # Get callback ID from register_callback method
                callback_id = self.cardinal.event_manager.register_callback(
                    event_name, callback['method'])

                # Append to list of callbacks for given event_name
                callback_ids[event_name].append(callback_id)

        return callback_ids
Transform ip string to "safe" format.
dataset/ETHPy150Open JohnMaguire/Cardinal/cardinal/plugins.py/PluginManager._register_plugin_callbacks--crossover with--dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/utils.py/safe_ip_format