(op)
Return the detail portion of the most recent "worker assigned" event.
Return the detail portion of the most recent "worker assigned" event.
Return the detail portion of the most recent worker assigned event .
def get_worker_assigned_event_details(op):
  """Return the detail portion of the most recent "worker assigned" event."""

  events = get_worker_assigned_events(op)
  if not events:
    return None

  if _API_VERSION == google_v2_versions.V2ALPHA1:
    return events[0].get('details', {})

  elif _API_VERSION == google_v2_versions.V2BETA:
    return events[0].get('workerAssigned', {})

  else:
    assert False, 'Unexpected version: {}'.format(_API_VERSION)
def get_worker_assigned_event_details ( op ) : events = get_worker_assigned_events ( op ) if not events : return None if _API_VERSION == google_v2_versions . V2ALPHA1 : return events [ 0 ] . get ( 'details' , { } ) elif _API_VERSION == google_v2_versions . V2BETA : return events [ 0 ] . get ( 'workerAssigned' , { } ) else : assert False , 'Unexpected version: {}' . format ( _API_VERSION )