<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_presubscriptions(self, presubscriptions):
 """Update pre-subscription data. Pre-subscription data will be removed for empty list. :param presubscriptions: list of `Presubscription` objects (Required) :returns: None """

        api = self._get_api(mds.SubscriptionsApi)
        presubscriptions_list = []
        for presubscription in presubscriptions:
            if not isinstance(presubscription, dict):
                presubscription = presubscription.to_dict()
            presubscription = {
                "endpoint_name": presubscription.get("device_id", None),
                "endpoint_type": presubscription.get("device_type", None),
                "_resource_path": presubscription.get("resource_paths", None)
            }
            presubscriptions_list.append(PresubscriptionData(**presubscription))
        return api.update_pre_subscriptions(presubscriptions_list)