def GetDesiredAccounts(self):
    """Get a list of the accounts desired on the system.

    Returns:
      A dict of the form: {'username': ['sshkey1, 'sshkey2', ...]}.
    """
    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 __HOLE__:
      logging.debug('Project or instance attributes were not found.')

    return AccountDataToDictionary(account_data)
dataset/ETHPy150Open GoogleCloudPlatform/compute-image-packages/google-daemon/usr/share/google/google_daemon/desired_accounts.py/DesiredAccounts.GetDesiredAccounts