code: def validate_service_account(service_account):
      """Validates service_account conform guidelines.
  
      Ref.[user managed service accounts](
      https://cloud.google.com/iam/docs/service-accounts#user-managed)
  
      Args:
          service_account: String service account to validate.
      Raises:
          ValueError if the given service_account is not conformant.
      """
  
      if service_account and not re.match(
          r"^.*@([a-z0-9\-]){6,30}\.iam\.gserviceaccount\.com",
          service_account,
      ):
          raise ValueError(
              "Invalid service_account: service_account should follow "
              "service-account-name@project-id.iam.gserviceaccount.com "
              "Received: {}.".format(service_account)
          )
  
file_path: cloud/src/python/tensorflow_cloud/core/gcp.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import re
  import google.auth
label_desc: Use image node_id 9 for calling a global function with example usage: validate_service_account(service_account) without return types