(e)
Retun True if the event is an operation failed event.
Retun True if the event is an operation failed event.
Retun True if the event is an operation failed event .
def is_failed_event(e):
  """Retun True if the event is an operation failed event."""
  if _API_VERSION == google_v2_versions.V2ALPHA1:

    return e.get('details', {}).get(
        '@type') == 'type.googleapis.com/google.genomics.v2alpha1.FailedEvent'

  elif _API_VERSION == google_v2_versions.V2BETA:

    return 'failed' in e

  else:
    assert False, 'Unexpected version: {}'.format(_API_VERSION)
def is_failed_event ( e ) : if _API_VERSION == google_v2_versions . V2ALPHA1 : return e . get ( 'details' , { } ) . get ( '@type' ) == 'type.googleapis.com/google.genomics.v2alpha1.FailedEvent' elif _API_VERSION == google_v2_versions . V2BETA : return 'failed' in e else : assert False , 'Unexpected version: {}' . format ( _API_VERSION )