<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def update_notification_command(self, notif, contact, macromodulations, timeperiods, host_ref=None):
 """Update the notification command by resolving Macros And because we are just launching the notification, we can say that this contact has been notified :param notif: notification to send :type notif: alignak.objects.notification.Notification :param contact: contact for this host/service :type contact: alignak.object.contact.Contact :param macromodulations: Macro modulations objects, used in the notification command :type macromodulations: alignak.objects.macromodulation.Macromodulations :param timeperiods: Timeperiods objects, used to get modulation period :type timeperiods: alignak.objects.timeperiod.Timeperiods :param host_ref: reference host (used for a service) :type host_ref: alignak.object.host.Host :return: None """

        cls = self.__class__
        macrosolver = MacroResolver()
        data = self.get_data_for_notifications(contact, notif, host_ref)
        notif.command = macrosolver.resolve_command(notif.command_call, data, macromodulations,
                                                    timeperiods)
        if cls.enable_environment_macros or notif.enable_environment_macros:
            notif.env = macrosolver.get_env_macros(data)