docs: def get_subscription_from_cli(name=None):
      '''Get the default, or named, subscription id from CLI's local cache.
  
      Args:
          name (str): Optional subscription name. If this is set, the subscription id of the named
             subscription is returned from the CLI cache if present. If not set, the subscription id
             of the default subscription is returned.
  
      Returns:
          Azure subscription ID string.
  
      Requirements:
          User has run 'az login' once, or is in Azure Cloud Shell.
      '''
      home = os.path.expanduser('~')
      azure_profile_path = home + os.sep + '.azure' + os.sep + 'azureProfile.json'
      if os.path.isfile(azure_profile_path) is False:
          print('Error from get_subscription_from_cli(): Cannot find ' +
                azure_profile_path)
          return None
      with io.open(azure_profile_path, 'r', encoding='utf-8-sig') as azure_profile_fd:
          azure_profile = json.load(azure_profile_fd)
      for subscription_info in azure_profile['subscriptions']:
          if (name is None and subscription_info['isDefault'] is True) or \
                                              subscription_info['name'] == name:
              return subscription_info['id']
      return None