def METHOD_NAME(resource, principals, iam_v1, role, credentials):
    """Grant a given `role` on the `resource` to a set of `principals`.
  Args:
    resource: (str) full resource name that should be assigned the role.
    principals: List(str) The list of principals that should be assigned the
      role.
    iam_v1: RPC stub for calling IAM api
    role: (str) The role that should be assigned to the resource.
    credentials: client credentials
  Returns:
    The new policy on the resource with the newly granted bindings.
  """
    http = httplib2.Http()
    authorize_http = AuthorizedHttp(credentials, http=http)
    resource_prefix = "//iam.googleapis.com/"
    resource_name = resource[len(resource_prefix):]
    cur_policy = iam_v1.projects().serviceAccounts().getIamPolicy(
        resource=resource_name).execute(http=authorize_http)
    del cur_policy["etag"]
    new_bindings = {"role": role, "members": principals}
    cur_policy.setdefault("bindings", []).append(new_bindings)
    new_policy = iam_v1.projects().serviceAccounts().setIamPolicy(
        resource=resource_name, body={
            "policy": cur_policy
        }).execute()
    return {"resource": resource, "new_policy": new_policy}