code: def _verify_azure_creds():
      if util.which("az"):
          cmd_login = ["az", "account", "list-locations"]
          devnull = open(os.devnull, "w")
          try:
              out = subprocess.check_output(cmd_login, stderr=devnull)
          except subprocess.CalledProcessError as e:
              raise remotelib.OperationError(
                  "User must be logged into Azure CLI - run 'az login' or refer to "
                  "https://docs.microsoft.com/en-us/cli/azure/authenticate-azure-cli "
                  "for more information."
              ) from e
          else:
              return out.decode("utf-8").split(os.linesep, 1)[0]
      else:
          raise remotelib.OperationError(
              "Azure CLI is required for this operation - refer to "
              "https://docs.microsoft.com/en-us/cli/azure/install-azure-cli "
              "for more information."
          )
  
imports: import json
  import logging
  import os
  import re
  import subprocess
  import sys
  from guild import remote
  from guild import remote_util
  from guild import util
  from guild import var
  from .None import ssh
  from .None import ssh_util
label_desc: Use image node_id 8 for calling the AzureVMRemote obj's underlying member method code with example usage: obj._verify_azure_creds() and returns: out