def GetDesiredAccounts(self):
    logging.debug('Getting desired accounts from metadata.')
    # Fetch the top level attribute with a hanging get.
    metadata_content = self._GetMetadataUpdate()
    metadata_dict = json.loads(metadata_content or '{}')
    account_data = None

    try:
      instance_data = metadata_dict['instance']['attributes']
      project_data = metadata_dict['project']['attributes']
      # Instance SSH keys to use regardless of project metadata.
      valid_keys = [instance_data.get('sshKeys'), instance_data.get('ssh-keys')]
      block_project = instance_data.get('block-project-ssh-keys', '').lower()
      if block_project != 'true' and not instance_data.get('sshKeys'):
        valid_keys.append(project_data.get('ssh-keys'))
        valid_keys.append(project_data.get('sshKeys'))
      valid_keys = [key for key in valid_keys if key]
      account_data = '\n'.join(valid_keys)
    except KeyError:
      logging.debug('Project or instance attributes were not found.')

    return AccountDataToDictionary(account_data)
Delete operations on an account, optional container and optional list
dataset/ETHPy150Open GoogleCloudPlatform/compute-image-packages/google-daemon/usr/share/google/google_daemon/desired_accounts.py/DesiredAccounts.GetDesiredAccounts--crossover with--dataset/ETHPy150Open openstack/python-swiftclient/swiftclient/service.py/SwiftService.delete