<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def upload(self, href, vobject_item):
 """Upload a new or replace an existing item."""

        if self.is_fake:
            return

        content = vobject_item.serialize()
        try:
            item = self.get(href)
            etesync_item = item.etesync_item
            etesync_item.content = content
        except api.exceptions.DoesNotExist:
            etesync_item = self.collection.get_content_class().create(self.collection, content)

        etesync_item.save()

        return self.get(href)