def DownloadActivity(self, serviceRecord, activity):
        # activity might not be populated at this point, still possible to bail out
        if not activity.ServiceData["Tagged"]:
            if not (hasattr(serviceRecord, "Config") and "UploadUntagged" in serviceRecord.Config or serviceRecord.Config["UploadUntagged"]):
                raise APIExcludeActivity("Activity untagged", permanent=False, activity_id=activity.ServiceData["Path"], user_exception=UserException(UserExceptionType.Untagged))

        # activity might already be populated, if not download it again
        path = activity.ServiceData["Path"]
        dbcl = self._getClient(serviceRecord)
        fullActivity, rev = self._getActivity(serviceRecord, dbcl, path)
        fullActivity.Type = activity.Type
        fullActivity.ServiceDataCollection = activity.ServiceDataCollection
        activity = fullActivity

        # Dropbox doesn't support stationary activities yet.
        if activity.CountTotalWaypoints() <= 1:
            raise APIExcludeActivity("Too few waypoints", activity_id=path, user_exception=UserException(UserExceptionType.Corrupt))

        return activity
dataset/ETHPy150Open cpfair/tapiriik/tapiriik/services/Dropbox/dropbox.py/DropboxService.DownloadActivity/operator `and` -> `or`