code: def _GetInstanceAndProjectAttributes(self, metadata_dict):
      
      metadata_dict = metadata_dict or {}
  
      try:
        instance_data = metadata_dict['instance']['attributes']
      except KeyError:
        instance_data = {}
        self.logger.warning('Instance attributes were not found.')
  
      try:
        project_data = metadata_dict['project']['attributes']
      except KeyError:
        project_data = {}
        self.logger.warning('Project attributes were not found.')
  
      return instance_data, project_data
docs: Get dictionaries for instance and project attributes.
  
      Args:
        metadata_dict: json, the deserialized contents of the metadata server.
  
      Returns:
        tuple, two dictionaries for instance and project attributes.