def Delete(self, object_or_uri, *args, **kwargs):
    """Delete an object.

    Re-implementing the GDataService.Delete method, to add some
    convenience.

    Arguments:
    object_or_uri: Any object that has a GetEditLink() method that
      returns a link, or a uri to that object.

    Returns:
    ? or GooglePhotosException on errors
    """
    try:
      uri = object_or_uri.GetEditLink().href
    except __HOLE__:
      uri = object_or_uri
    try:
      return gdata.service.GDataService.Delete(self, uri, *args, **kwargs)
    except gdata.service.RequestError, e:
      raise GooglePhotosException(e.args[0])
dataset/ETHPy150Open acil-bwh/SlicerCIP/Scripted/attic/PicasaSnap/gdata/photos/service.py/PhotosService.Delete