def resolve_etag_is_at_header(req, metadata):
 alternate_etag = None
 metadata = HeaderKeyDict(metadata)
 if ('X-Backend-Etag-Is-At' in req.headers):
  names = list_from_csv(req.headers['X-Backend-Etag-Is-At'])
  for name in names:
   if (name in metadata):
    alternate_etag = metadata[name]
    break
 return alternate_etag

def resolve_etag_is_at_header ( req , metadata ) : alternate_etag = None metadata = HeaderKeyDict ( metadata ) if ( 'X-Backend-Etag-Is-At' in req . headers ) : names = list_from_csv ( req . headers [ 'X-Backend-Etag-Is-At' ] ) for name in names : if ( name in metadata ) : alternate_etag = metadata [ name ] break return alternate_etag
helper function to resolve an alternative etag value that may be stored in metadata under an alternate name .