code: func RuleIsManaged(r *bzl.Rule) bool {
  	var automanaged bool
  	for _, tag := range r.AttrStrings("tags") {
  		if tag == automanagedTag {
  			automanaged = true
  			break
  		}
  	}
  	return automanaged
  }
docs: // RuleIsManaged returns whether the provided rule is managed by this tool,
  // based on the tags set on the rule.