(event)
Return True if the event is a "Worker assigned..." event.
Return True if the event is a "Worker assigned..." event.
Return True if the event is a Worker assigned ... event .
def is_worker_assigned_event(event):
  """Return True if the event is a "Worker assigned..." event."""
  if _API_VERSION == google_v2_versions.V2ALPHA1:
    return event.get('details', {}).get(
        '@type'
    ) == 'type.googleapis.com/google.genomics.v2alpha1.WorkerAssignedEvent'

  elif _API_VERSION == google_v2_versions.V2BETA:
    return 'workerAssigned' in event

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