def METHOD_NAME(project_id):
  """Get the project number from project ID."""
  resource_manager = build('cloudresourcemanager', 'v1')
  result = resource_manager.projects().get(projectId=project_id).execute()
  if 'projectNumber' not in result:
    raise AuthError('Failed to get project number.')
  return result['projectNumber']