def authenticate_storage(client_secrets, read_only=False):
if read_only:<EOL><INDENT>scopes = ['<STR_LIT>']<EOL><DEDENT>else:<EOL><INDENT>scopes = ['<STR_LIT>']<EOL><DEDENT>credentials = service_account.Credentials.from_service_account_info(<EOL>client_secrets)<EOL>scoped_credentials = credentials.with_scopes(scopes)<EOL>return scoped_credentials<EOL>
Authenticates a service account for reading and/or writing on a bucket.

    TODO: docstring