code: func (c *Manager) GetTagForCategory(ctx context.Context, id, category string) (*Tag, error) {
  	if category == "" {
  		return c.GetTag(ctx, id)
  	}
  
  	ids, err := c.ListTagsForCategory(ctx, category)
  	if err != nil {
  		return nil, err
  	}
  
  	for _, tagid := range ids {
  		tag, err := c.GetTag(ctx, tagid)
  		if err != nil {
  			return nil, fmt.Errorf("get tag for category %s %s: %s", category, tagid, err)
  		}
  		if tag.ID == id || tag.Name == id {
  			return tag, nil
  		}
  	}
  
  	return nil, fmt.Errorf("tag %q not found in category %q", id, category)
  }
docs: // GetTagForCategory fetches the tag information for the given identifier in the given category.