def authorized_http(credentials):
 if (HAS_GOOGLE_AUTH and isinstance(credentials, google.auth.credentials.Credentials)):
  return google_auth_httplib2.AuthorizedHttp(credentials, http=build_http())
 else:
  return credentials.authorize(build_http())

def authorized_http ( credentials ) : if ( HAS_GOOGLE_AUTH and isinstance ( credentials , google . auth . credentials . Credentials ) ) : return google_auth_httplib2 . AuthorizedHttp ( credentials , http = build_http ( ) ) else : return credentials . authorize ( build_http ( ) )
returns an http client that is authorized with the given credentials .