def get_assignment_id(data_store, assignment_resource_id):
  """Returns an assignment ID string from an assignment resource ID.

  Args:
    data_store: data_store.DataStore to read from if the assignment ID is not
      cached.
    assignment_resource_id: resource_id.FalkenResourceId of the assignment.

  Returns:
    assignment_id string.
  """
  assignment = data_store.read(assignment_resource_id)
  return assignment.assignment_id