code: def validate_tags(tags, existing_tags=None):
      """
      Raises MetaflowTaggingError if invalid based on these rules:
  
      Tag set size is too large. But it's OK if tag set is not larger
      than an existing tag set (if provided).
  
      Then, we validate each tag.  See validate_tag()
      """
      tag_set = frozenset(tags)
      if len(tag_set) > MAX_USER_TAG_SET_SIZE:
          # We want to allow user to remediate excessively large tag sets via tag mutation
          if existing_tags is None or len(
              frozenset(existing_tags)
          ) < len(tag_set):
              raise MetaflowTaggingError(
                  msg="Cannot increase size of tag set beyond %d"
                  % (MAX_USER_TAG_SET_SIZE,)
              )
      for tag in tag_set:
          validate_tag(tag)
  
imports: from metaflow.exception import MetaflowTaggingError
  from metaflow.util import unicode_type, bytes_type
label_desc: Use image node_id 3 for calling a global function with example usage: validate_tags(tags, existing_tags) without return types