code: async def setAnnotations(self, id_, entity_type, annotations):
          
          entity_id = self.resolve(id_)
          try:
              entity = self.model.state.get_entity(entity_type, entity_id)
          except KeyError:
              entity = await self.model._wait_for_new(entity_type, entity_id)
          return await entity.set_annotations(annotations)
docs: :param id_ string:
              Id is the placeholder for the application or machine change
              corresponding to the entity to be annotated.
  
          :param entity_type EntityType:
              EntityType holds the type of the entity, "application" or
              "machine".
  
          :param annotations map[string]string:
              Annotations holds the annotations as key/value pairs.